Skip to content

Commit e15566c

Browse files
authored
test: Regenerate GitSSHKey flake when comparing times (coder#1235)
This is a crazy one! The in-memory DB is fast, which allows the same exact timestamp to occur for regenerating the key! See: https://github.com/coder/coder/runs/6234173911?check_suite_focus=true#step:9:82
1 parent 81577f1 commit e15566c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/gitsshkey_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestGitSSHKey(t *testing.T) {
7070
require.NotEmpty(t, key1.PublicKey)
7171
key2, err := client.RegenerateGitSSHKey(ctx, res.UserID)
7272
require.NoError(t, err)
73-
require.Greater(t, key2.UpdatedAt, key1.UpdatedAt)
73+
require.GreaterOrEqual(t, key2.UpdatedAt, key1.UpdatedAt)
7474
require.NotEmpty(t, key2.PublicKey)
7575
require.NotEqual(t, key2.PublicKey, key1.PublicKey)
7676
})

0 commit comments

Comments
 (0)