-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update go-database-reconciler for fixing expression route handli…
…ng (#1344) Till now, expression routes were getting incorrectly rendered. Added changes in go-database-reconciler to allow proper rendering for both kinds of routes. Added tests here to ensure the functionality stays intact for future updates. Fix #1250.
- Loading branch information
1 parent
4b632fd
commit 6475b4b
Showing
7 changed files
with
84 additions
and
9 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
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
19 changes: 19 additions & 0 deletions
19
tests/integration/testdata/render/003-traditional-routes/expected.yaml
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,19 @@ | ||
_format_version: "3.0" | ||
services: | ||
- connect_timeout: 60000 | ||
host: localhost | ||
name: foo | ||
port: 8001 | ||
protocol: http | ||
read_timeout: 60000 | ||
routes: | ||
- name: foo | ||
paths: | ||
- /foo | ||
preserve_host: false | ||
protocols: | ||
- http | ||
- https | ||
regex_priority: 0 | ||
strip_path: true | ||
write_timeout: 60000 |
14 changes: 14 additions & 0 deletions
14
tests/integration/testdata/render/003-traditional-routes/input.yaml
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,14 @@ | ||
services: | ||
- host: localhost | ||
name: foo | ||
port: 8001 | ||
protocol: http | ||
routes: | ||
routes: | ||
- name: foo | ||
paths: | ||
- /foo | ||
preserve_host: false | ||
protocols: | ||
- http | ||
- https |
19 changes: 19 additions & 0 deletions
19
tests/integration/testdata/render/004-expression-routes/expected.yaml
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,19 @@ | ||
_format_version: "3.0" | ||
services: | ||
- connect_timeout: 60000 | ||
host: localhost | ||
name: foo | ||
port: 8001 | ||
protocol: http | ||
read_timeout: 60000 | ||
routes: | ||
- expression: (net.protocol == "http") && (http.method == "GET") && (http.path == | ||
"/foo") | ||
name: foo | ||
preserve_host: false | ||
priority: 0 | ||
protocols: | ||
- http | ||
- https | ||
strip_path: true | ||
write_timeout: 60000 |
9 changes: 9 additions & 0 deletions
9
tests/integration/testdata/render/004-expression-routes/input.yaml
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,9 @@ | ||
services: | ||
- host: localhost | ||
name: foo | ||
port: 8001 | ||
protocol: http | ||
routes: | ||
- expression: (net.protocol == "http") && (http.method == "GET") && (http.path == | ||
"/foo") | ||
name: foo |