Skip to content

Commit

Permalink
Fix tests for login expiry token
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-traverse committed Dec 8, 2024
1 parent 0289fee commit 350b74c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void testLoginFromScratch() throws Exception {
var cookies = response.headers().allValues("set-cookie");

var tokenCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-token")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry-utc")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry")).findFirst();
var userIdCookie = cookies.stream().filter(c -> c.startsWith("trac-user-id")).findFirst();
var userNameCookie = cookies.stream().filter(c -> c.startsWith("trac-user-name")).findFirst();

Expand Down Expand Up @@ -254,7 +254,7 @@ void testLoginExistingToken() throws Exception {
var cookies = response.headers().allValues("set-cookie");

var tokenCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-token")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry-utc")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry")).findFirst();
var userIdCookie = cookies.stream().filter(c -> c.startsWith("trac-user-id")).findFirst();
var userNameCookie = cookies.stream().filter(c -> c.startsWith("trac-user-name")).findFirst();

Expand Down Expand Up @@ -311,7 +311,7 @@ void testLoginTokenExpired() throws Exception {
var cookies = response.headers().allValues("set-cookie");

var tokenCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-token")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry-utc")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry")).findFirst();
var userIdCookie = cookies.stream().filter(c -> c.startsWith("trac-user-id")).findFirst();
var userNameCookie = cookies.stream().filter(c -> c.startsWith("trac-user-name")).findFirst();

Expand Down Expand Up @@ -358,7 +358,7 @@ void testLoginTokenGarbled() throws Exception {
var cookies = response.headers().allValues("set-cookie");

var tokenCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-token")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry-utc")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry")).findFirst();
var userIdCookie = cookies.stream().filter(c -> c.startsWith("trac-user-id")).findFirst();
var userNameCookie = cookies.stream().filter(c -> c.startsWith("trac-user-name")).findFirst();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void testRefreshBrowser() throws Exception {
var cookies = response.headers().allValues("set-cookie");

var tokenCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-token")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry-utc")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry")).findFirst();
var userIdCookie = cookies.stream().filter(c -> c.startsWith("trac-user-id")).findFirst();
var userNameCookie = cookies.stream().filter(c -> c.startsWith("trac-user-name")).findFirst();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void testLoginFromScratch() throws Exception {
var cookies = response.headers().allValues("set-cookie");

var tokenCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-token")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry-utc")).findFirst();
var expiryCookie = cookies.stream().filter(c -> c.startsWith("trac-auth-expiry")).findFirst();
var userIdCookie = cookies.stream().filter(c -> c.startsWith("trac-user-id")).findFirst();
var userNameCookie = cookies.stream().filter(c -> c.startsWith("trac-user-name")).findFirst();

Expand Down

0 comments on commit 350b74c

Please sign in to comment.