Skip to content

Commit 0d46ef9

Browse files
GDORIVER-2934 Add list of possible OS and Go dep errors to case 6 (#1535)
1 parent a5a237e commit 0d46ef9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

mongo/integration/client_side_encryption_prose_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,15 @@ func TestClientSideEncryptionProse(t *testing.T) {
22382238
crypt, err := mongocrypt.NewMongoCrypt(opts)
22392239
assert.Nil(mt, err, "error in NewMongoCrypt: %v", err)
22402240
_, err = crypt.GetKmsProviders(context.Background())
2241-
assert.ErrorContains(mt, err, "Client.Timeout or context cancellation while reading body")
2241+
2242+
possibleErrors := []string{
2243+
"error reading response body: context deadline exceeded", // <= 1.19 + RHEL & macOS
2244+
"Client.Timeout or context cancellation while reading body", // > 1.20 on all OS
2245+
}
2246+
2247+
assert.True(t, containsSubstring(possibleErrors, err.Error()),
2248+
"expected possibleErrors=%v to contain %v, but it didn't",
2249+
possibleErrors, err.Error())
22422250
})
22432251
})
22442252

0 commit comments

Comments
 (0)