-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: implement a file based test for session persistence
Signed-off-by: Kensei Nakada <handbomusic@gmail.com>
- Loading branch information
1 parent
6ed0db1
commit 0f45c69
Showing
10 changed files
with
195 additions
and
282 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
internal/xds/translator/testdata/in/xds-ir/http-route-session-persistence.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,65 @@ | ||
http: | ||
- name: "first-listener" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
hostnames: | ||
- "*" | ||
path: | ||
mergeSlashes: true | ||
escapedSlashesAction: UnescapeAndRedirect | ||
routes: | ||
- name: "header-based-session-persistence-route" | ||
hostname: "*" | ||
pathMatch: | ||
safeRegex: "/v1/.*" | ||
sessionPersistence: | ||
sessionName: "session1" | ||
header: {} | ||
destination: | ||
name: "regex-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- name: "cookie-based-session-persistence-route-regex" | ||
hostname: "*" | ||
pathMatch: | ||
safeRegex: "/v1/.*/hoge" | ||
sessionPersistence: | ||
sessionName: "session1" | ||
cookie: | ||
ttl: "1h" | ||
destination: | ||
name: "regex-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- name: "cookie-based-session-persistence-route-prefix" | ||
hostname: "*" | ||
pathMatch: | ||
prefix: "/v2/" | ||
sessionPersistence: | ||
sessionName: "session1" | ||
cookie: | ||
ttl: "1h" | ||
destination: | ||
name: "regex-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- name: "cookie-based-session-persistence-route-exact" | ||
hostname: "*" | ||
pathMatch: | ||
exact: "/v3/user" | ||
sessionPersistence: | ||
sessionName: "session1" | ||
cookie: | ||
ttl: "1h" | ||
destination: | ||
name: "regex-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
Check failure on line 65 in internal/xds/translator/testdata/in/xds-ir/http-route-session-persistence.yaml GitHub Actions / lint
|
Oops, something went wrong.