From 11b88cf2f9282cdad7f14e185df33e9e993e6e17 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira da Silva Date: Wed, 2 Oct 2019 06:56:50 -0300 Subject: [PATCH] [KEYCLOAK-11611] Broken tests for cookies on Gatekeeper --- cookies_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cookies_test.go b/cookies_test.go index 5b2e738ed..3322cd23f 100644 --- a/cookies_test.go +++ b/cookies_test.go @@ -130,7 +130,7 @@ func TestDropCookie(t *testing.T) { p.config.SecureCookie = true p.dropCookie(resp, req.Host, "test-cookie", "test-value", 0) assert.NotEqual(t, resp.Header().Get("Set-Cookie"), - "test-cookie=test-value; Path=/; Domain=127.0.0.2; HttpOnly; Secure", + "test-cookie=test-value; Path=/; HttpOnly; Secure", "we have not set the cookie, headers: %v", resp.Header()) p.config.CookieDomain = "test.com" @@ -174,7 +174,7 @@ func TestSameSiteCookie(t *testing.T) { p.dropCookie(resp, req.Host, "test-cookie", "test-value", 0) assert.Equal(t, resp.Header().Get("Set-Cookie"), - "test-cookie=test-value; Path=/; Domain=127.0.0.1", + "test-cookie=test-value; Path=/", "we have not set the cookie, headers: %v", resp.Header()) req = newFakeHTTPRequest("GET", "/admin") @@ -183,7 +183,7 @@ func TestSameSiteCookie(t *testing.T) { p.dropCookie(resp, req.Host, "test-cookie", "test-value", 0) assert.Equal(t, resp.Header().Get("Set-Cookie"), - "test-cookie=test-value; Path=/; Domain=127.0.0.1; SameSite=Strict", + "test-cookie=test-value; Path=/; SameSite=Strict", "we have not set the cookie, headers: %v", resp.Header()) req = newFakeHTTPRequest("GET", "/admin") @@ -192,7 +192,7 @@ func TestSameSiteCookie(t *testing.T) { p.dropCookie(resp, req.Host, "test-cookie", "test-value", 0) assert.Equal(t, resp.Header().Get("Set-Cookie"), - "test-cookie=test-value; Path=/; Domain=127.0.0.1; SameSite=Lax", + "test-cookie=test-value; Path=/; SameSite=Lax", "we have not set the cookie, headers: %v", resp.Header()) req = newFakeHTTPRequest("GET", "/admin") @@ -201,7 +201,7 @@ func TestSameSiteCookie(t *testing.T) { p.dropCookie(resp, req.Host, "test-cookie", "test-value", 0) assert.Equal(t, resp.Header().Get("Set-Cookie"), - "test-cookie=test-value; Path=/; Domain=127.0.0.1", + "test-cookie=test-value; Path=/", "we have not set the cookie, headers: %v", resp.Header()) }