Skip to content

Commit a0f5116

Browse files
committed
test: Regenerate GitSSHKey flake when comparing times (#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 9cb5fa9 commit a0f5116

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy