diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-25 10:55:21 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-25 10:55:21 +0200 |
| commit | c9603e4a2ec682ca30399205ccbf533f55230ad4 (patch) | |
| tree | b52f0179cda162da5e58dc4e28c7b214ac01acf1 /internal/verify | |
| parent | 53f866b097bbd16f396f3107998c8e452de57037 (diff) | |
Verify Test: Fix ugly race condition found with Go's -race flag
Diffstat (limited to 'internal/verify')
| -rw-r--r-- | internal/verify/verify_test.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/verify/verify_test.go b/internal/verify/verify_test.go index 1720c97..e250ee7 100644 --- a/internal/verify/verify_test.go +++ b/internal/verify/verify_test.go @@ -114,7 +114,7 @@ func Test_verifyWithKeys(t *testing.T) { pk, }, { - &verifySigTimeEarlierError, + &verifyInvalidTrustedCommentError, "TC no file", "server_list.json.tc_nofile.minisig", "server_list.json", @@ -123,7 +123,7 @@ func Test_verifyWithKeys(t *testing.T) { pk, }, { - &verifySigTimeEarlierError, + &verifyInvalidTrustedCommentError, "TC no time", "server_list.json.tc_notime.minisig", "server_list.json", @@ -132,7 +132,7 @@ func Test_verifyWithKeys(t *testing.T) { pk, }, { - &verifySigTimeEarlierError, + &verifyInvalidTrustedCommentError, "TC empty time", "server_list.json.tc_emptytime.minisig", "server_list.json", @@ -141,7 +141,7 @@ func Test_verifyWithKeys(t *testing.T) { pk, }, { - &verifyInvalidSignatureFormatError, + &verifyWrongSigFilenameError, "TC empty file", "server_list.json.tc_emptyfile.minisig", "server_list.json", @@ -343,7 +343,6 @@ func Test_verifyWithKeys(t *testing.T) { forcePrehash := true for _, tt := range tests { t.Run(tt.testName, func(t *testing.T) { - t.Parallel() valid, err := verifyWithKeys(string(files[tt.signatureFile]), files[tt.jsonFile], tt.expectedFileName, tt.minSignTime, tt.allowedPks, forcePrehash) compareResults(t, valid, err, tt.expectedErr, func() string { |
