Skip to content

Commit

Permalink
test: Regenerate GitSSHKey flake when comparing times (#1235)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kylecarbs committed Apr 30, 2022
1 parent 81577f1 commit e15566c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coderd/gitsshkey_test.go
Expand Up @@ -70,7 +70,7 @@ func TestGitSSHKey(t *testing.T) {
require.NotEmpty(t, key1.PublicKey)
key2, err := client.RegenerateGitSSHKey(ctx, res.UserID)
require.NoError(t, err)
require.Greater(t, key2.UpdatedAt, key1.UpdatedAt)
require.GreaterOrEqual(t, key2.UpdatedAt, key1.UpdatedAt)
require.NotEmpty(t, key2.PublicKey)
require.NotEqual(t, key2.PublicKey, key1.PublicKey)
})
Expand Down

0 comments on commit e15566c

Please sign in to comment.