-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mustafa Abdelrahman <[email protected]>
- Loading branch information
1 parent
35b2d99
commit ed092f3
Showing
8 changed files
with
192 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
cmd/webhook/admission/testdata/rg-with-invalid-eskip-filters-and-predicates.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"request": { | ||
"uid": "req-uid", | ||
"name": "req1", | ||
"operation": "create", | ||
"kind": { | ||
"group": "zalando", | ||
"version": "v1", | ||
"kind": "RouteGroup" | ||
}, | ||
"namespace": "n1", | ||
"object": { | ||
"metadata": { | ||
"name": "rg1", | ||
"namespace": "n1" | ||
}, | ||
"spec": { | ||
"backends": [ | ||
{ | ||
"name": "backend", | ||
"type": "shunt" | ||
} | ||
], | ||
"defaultBackends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"routes": [ | ||
{ | ||
"backends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"filters": [ | ||
"status&(201)" | ||
], | ||
"path": "/", | ||
"predicates": [ | ||
"Method&(\"GET\")" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
cmd/webhook/admission/testdata/rg-with-invalid-eskip-predicates.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"request": { | ||
"uid": "req-uid", | ||
"name": "req1", | ||
"operation": "create", | ||
"kind": { | ||
"group": "zalando", | ||
"version": "v1", | ||
"kind": "RouteGroup" | ||
}, | ||
"namespace": "n1", | ||
"object": { | ||
"metadata": { | ||
"name": "rg1", | ||
"namespace": "n1" | ||
}, | ||
"spec": { | ||
"backends": [ | ||
{ | ||
"name": "backend", | ||
"type": "shunt" | ||
} | ||
], | ||
"defaultBackends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"routes": [ | ||
{ | ||
"backends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"filters": [ | ||
"status(201)" | ||
], | ||
"path": "/", | ||
"predicates": [ | ||
"Method&(\"GET\")" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
cmd/webhook/admission/testdata/rg-with-valid-eskip-predicates.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"request": { | ||
"uid": "req-uid", | ||
"name": "req1", | ||
"operation": "create", | ||
"kind": { | ||
"group": "zalando", | ||
"version": "v1", | ||
"kind": "RouteGroup" | ||
}, | ||
"namespace": "n1", | ||
"object": { | ||
"metadata": { | ||
"name": "rg1", | ||
"namespace": "n1" | ||
}, | ||
"spec": { | ||
"backends": [ | ||
{ | ||
"name": "backend", | ||
"type": "shunt" | ||
} | ||
], | ||
"defaultBackends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"routes": [ | ||
{ | ||
"backends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"filters": [ | ||
"status(201)" | ||
], | ||
"path": "/", | ||
"predicates": [ | ||
"Method(\"GET\")" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
dataclients/kubernetes/testdata/routegroups/convert/failing-predicate.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
\[eskip\] predicate | ||
parse failed | ||
kind=RouteGroup name=myapp ns=foo | ||
\[routegroup\] parse failed after token Header, last route id: Header, position 6: syntax error |
4 changes: 1 addition & 3 deletions
4
...nts/kubernetes/testdata/routegroups/convert/single-failing-route-makes-the-group-fail.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
Error transforming | ||
\[eskip\] predicate | ||
kind=RouteGroup name=failing | ||
\[routegroup\] parse failed after token foo, last route id: foo, position 3: syntax error |