Skip to content

Commit a7e2c6f

Browse files
committed
fix signed token tests
1 parent 357eec2 commit a7e2c6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/workspaceapps/db_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ func Test_ResolveRequest(t *testing.T) {
256256

257257
require.Equal(t, &workspaceapps.SignedToken{
258258
Request: req,
259-
Expiry: token.Expiry, // ignored to avoid flakiness
259+
SessionID: token.SessionID, // ignored to avoid flakiness
260+
Expiry: token.Expiry, // ignored to avoid flakiness
260261
UserID: me.ID,
261262
WorkspaceID: workspace.ID,
262263
AgentID: agentID,
@@ -294,6 +295,7 @@ func Test_ResolveRequest(t *testing.T) {
294295
require.True(t, ok)
295296
// normalize expiry
296297
require.WithinDuration(t, token.Expiry, secondToken.Expiry, 2*time.Second)
298+
secondToken.SessionID = token.SessionID
297299
secondToken.Expiry = token.Expiry
298300
require.Equal(t, token, secondToken)
299301
}
@@ -519,6 +521,7 @@ func Test_ResolveRequest(t *testing.T) {
519521
// App name differs
520522
AppSlugOrPort: appNamePublic,
521523
},
524+
SessionID: uuid.New(),
522525
Expiry: time.Now().Add(time.Minute),
523526
UserID: me.ID,
524527
WorkspaceID: workspace.ID,

0 commit comments

Comments
 (0)