From e15566c7fa15a7b536322da84fb7ced8adc74746 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Fri, 29 Apr 2022 20:19:16 -0500 Subject: [PATCH] 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 --- coderd/gitsshkey_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderd/gitsshkey_test.go b/coderd/gitsshkey_test.go index 4a53727817..1839cd9bd3 100644 --- a/coderd/gitsshkey_test.go +++ b/coderd/gitsshkey_test.go @@ -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) })