Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IIpragmaII committed Oct 8, 2024
1 parent 7833fbe commit 10f674a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
- "traefik.http.services.service02.loadbalancer.sticky.cookie.httponly=true"
- "traefik.http.services.service02.loadbalancer.sticky.cookie.maxage=42"
- "traefik.http.services.service02.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service02.loadbalancer.sticky.cookie.path=/"
- "traefik.http.services.service02.loadbalancer.sticky.cookie.path=foobar"
- "traefik.http.services.service02.loadbalancer.sticky.cookie.samesite=foobar"
- "traefik.http.services.service02.loadbalancer.sticky.cookie.secure=true"
- "traefik.http.services.service02.loadbalancer.server.port=foobar"
Expand Down
4 changes: 2 additions & 2 deletions docs/content/reference/dynamic-configuration/file.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
httpOnly = true
sameSite = "foobar"
maxAge = 42
path = "/"
path = "foobar"

[[http.services.Service02.loadBalancer.servers]]
url = "foobar"
Expand Down Expand Up @@ -111,7 +111,7 @@
httpOnly = true
sameSite = "foobar"
maxAge = 42
path = "/"
path = "foobar"
[http.services.Service04.weighted.healthCheck]
[http.middlewares]
[http.middlewares.Middleware01]
Expand Down
4 changes: 2 additions & 2 deletions docs/content/reference/dynamic-configuration/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ http:
httpOnly: true
sameSite: foobar
maxAge: 42
path: /
path: foobar
servers:
- url: foobar
weight: 42
Expand Down Expand Up @@ -112,7 +112,7 @@ http:
httpOnly: true
sameSite: foobar
maxAge: 42
path: /
path: foobar
healthCheck: {}
middlewares:
Middleware01:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -1147,7 +1147,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -2706,7 +2706,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -2819,7 +2819,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -3008,7 +3008,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -3061,7 +3061,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down
4 changes: 2 additions & 2 deletions docs/content/reference/dynamic-configuration/kv-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ THIS FILE MUST NOT BE EDITED BY HAND
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/httpOnly` | `true` |
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/maxAge` | `42` |
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/name` | `foobar` |
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/path` | `/` |
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/path` | `foobar` |
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/sameSite` | `foobar` |
| `traefik/http/services/Service02/loadBalancer/sticky/cookie/secure` | `true` |
| `traefik/http/services/Service03/mirroring/healthCheck` | `` |
Expand All @@ -283,7 +283,7 @@ THIS FILE MUST NOT BE EDITED BY HAND
| `traefik/http/services/Service04/weighted/sticky/cookie/httpOnly` | `true` |
| `traefik/http/services/Service04/weighted/sticky/cookie/maxAge` | `42` |
| `traefik/http/services/Service04/weighted/sticky/cookie/name` | `foobar` |
| `traefik/http/services/Service04/weighted/sticky/cookie/path` | `/` |
| `traefik/http/services/Service04/weighted/sticky/cookie/path` | `foobar` |
| `traefik/http/services/Service04/weighted/sticky/cookie/sameSite` | `foobar` |
| `traefik/http/services/Service04/weighted/sticky/cookie/secure` | `true` |
| `traefik/tcp/middlewares/TCPMiddleware01/ipAllowList/sourceRange/0` | `foobar` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -400,7 +400,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -589,7 +589,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -642,7 +642,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down
12 changes: 6 additions & 6 deletions integration/fixtures/k8s/01-traefik-crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -1147,7 +1147,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -2706,7 +2706,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -2819,7 +2819,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -3008,7 +3008,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down Expand Up @@ -3061,7 +3061,7 @@ spec:
description: Name defines the Cookie name.
type: string
path:
description: |-
description: |-
When path is set the cookie will only be sent for requests to the given path or subpaths.
When not provided the cookie will be sent on every request to the domain.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
Expand Down
5 changes: 4 additions & 1 deletion pkg/config/label/label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ func TestDecodeConfiguration(t *testing.T) {
"traefik.http.services.Service0.loadbalancer.server.port": "8080",
"traefik.http.services.Service0.loadbalancer.sticky.cookie.name": "foobar",
"traefik.http.services.Service0.loadbalancer.sticky.cookie.secure": "true",
"traefik.http.services.Service0.loadbalancer.sticky.cookie.path": "/foobar",
"traefik.http.services.Service0.loadbalancer.serversTransport": "foobar",
"traefik.http.services.Service1.loadbalancer.healthcheck.headers.name0": "foobar",
"traefik.http.services.Service1.loadbalancer.healthcheck.headers.name1": "foobar",
Expand Down Expand Up @@ -674,6 +675,7 @@ func TestDecodeConfiguration(t *testing.T) {
Name: "foobar",
Secure: true,
HTTPOnly: false,
Path: "/foobar",
},
},
Servers: []dynamic.Server{
Expand Down Expand Up @@ -1196,6 +1198,7 @@ func TestEncodeConfiguration(t *testing.T) {
Cookie: &dynamic.Cookie{
Name: "foobar",
HTTPOnly: true,
Path: "/foobar",
},
},
Servers: []dynamic.Server{
Expand Down Expand Up @@ -1433,7 +1436,7 @@ func TestEncodeConfiguration(t *testing.T) {
"traefik.HTTP.Services.Service0.LoadBalancer.Sticky.Cookie.HTTPOnly": "true",
"traefik.HTTP.Services.Service0.LoadBalancer.Sticky.Cookie.Secure": "false",
"traefik.HTTP.Services.Service0.LoadBalancer.Sticky.Cookie.MaxAge": "0",
"traefik.HTTP.Services.Service0.LoadBalancer.Sticky.Cookie.Path": "/",
"traefik.HTTP.Services.Service0.LoadBalancer.Sticky.Cookie.Path": "/foobar",
"traefik.HTTP.Services.Service0.LoadBalancer.ServersTransport": "foobar",
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Headers.name0": "foobar",
"traefik.HTTP.Services.Service1.LoadBalancer.HealthCheck.Headers.name1": "foobar",
Expand Down

0 comments on commit 10f674a

Please sign in to comment.