From 625dfe2d9d741d37f9565ff16c6611374f47d8eb Mon Sep 17 00:00:00 2001 From: Paul Hinterberger Date: Tue, 8 Oct 2024 18:39:51 +0200 Subject: [PATCH] specify path for test cookie --- pkg/config/label/label_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/config/label/label_test.go b/pkg/config/label/label_test.go index 64438bc380..f615c0a1eb 100644 --- a/pkg/config/label/label_test.go +++ b/pkg/config/label/label_test.go @@ -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", @@ -674,6 +675,7 @@ func TestDecodeConfiguration(t *testing.T) { Name: "foobar", Secure: true, HTTPOnly: false, + Path: "/foobar", }, }, Servers: []dynamic.Server{ @@ -1196,6 +1198,7 @@ func TestEncodeConfiguration(t *testing.T) { Cookie: &dynamic.Cookie{ Name: "foobar", HTTPOnly: true, + Path: "/foobar", }, }, Servers: []dynamic.Server{ @@ -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",