diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2017-08-28 16:12:18 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2017-08-29 13:36:34 +0200 |
commit | 9e18877de402762f3028d8690a8d1c6591ef4d7a (patch) | |
tree | 85e380419869aa639c5641fb552c27832f41274a /jdisc_http_service/src/test/java/com/yahoo/jdisc/http | |
parent | 536d9f0225cc17c86361f435e22264e631bf7208 (diff) |
Remove Netty by replacing cookie codec with Jetty + Java SE
Diffstat (limited to 'jdisc_http_service/src/test/java/com/yahoo/jdisc/http')
-rw-r--r-- | jdisc_http_service/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java | 7 | ||||
-rw-r--r-- | jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java index 0c98f294c82..ca12de72ec2 100644 --- a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java +++ b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/CookieTestCase.java @@ -106,14 +106,14 @@ public class CookieTestCase { "foo.name=foo.value", Collections.singletonList(newCookie("foo"))); assertEncodeCookie( - "foo.name=foo.value; bar.name=bar.value", + "foo.name=foo.value;bar.name=bar.value", Arrays.asList(newCookie("foo"), newCookie("bar"))); } @Test public void requireThatSetCookieCanBeEncoded() { assertEncodeSetCookie( - Collections.singletonList("foo.name=foo.value; Path=path; Domain=domain; Secure; HTTPOnly"), + Collections.singletonList("foo.name=foo.value;Path=path;Domain=domain;Secure;HttpOnly"), Collections.singletonList(newSetCookie("foo"))); } @@ -131,6 +131,7 @@ public class CookieTestCase { } @Test + @SuppressWarnings("deprecation") public void requireThatSetCookieCanBeDecoded() { final Cookie foo = new Cookie(); foo.setName("foo.name"); @@ -140,6 +141,7 @@ public class CookieTestCase { foo.setMaxAge(0, TimeUnit.SECONDS); foo.setSecure(true); foo.setHttpOnly(true); + foo.setVersion(1); assertDecodeSetCookie(foo, "foo.name=foo.value;Max-Age=0;Path=path;Domain=domain;Secure;HTTPOnly;"); final Cookie bar = new Cookie(); @@ -148,6 +150,7 @@ public class CookieTestCase { bar.setPath("path"); bar.setDomain("domain"); bar.setMaxAge(0, TimeUnit.SECONDS); + bar.setVersion(1); assertDecodeSetCookie(bar, "bar.name=bar.value;Max-Age=0;Path=path;Domain=domain;"); } diff --git a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java index 221a1adc1fe..7ed13decbf6 100644 --- a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java +++ b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java @@ -356,7 +356,7 @@ public class HttpServerTest { driver.client().get("/status.html") .expectStatusCode(is(OK)) .expectHeader("Set-Cookie", - is("foo=bar; Path=/foopath; Domain=.localhost; Secure; HTTPOnly")); + is("foo=bar;Path=/foopath;Domain=.localhost;Secure;HttpOnly")); assertThat(driver.close(), is(true)); } |