Skip to content

Commit 9ba99ba

Browse files
prestonvasquezqingyang-hu
authored andcommitted
GDORIVER-2934 Add list of possible OS and Go dep errors to case 6 (#1535)
1 parent 132958b commit 9ba99ba

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
@@ -2234,7 +2234,15 @@ func TestClientSideEncryptionProse(t *testing.T) {
22342234
crypt, err := mongocrypt.NewMongoCrypt(opts)
22352235
assert.Nil(mt, err, "error in NewMongoCrypt: %v", err)
22362236
_, err = crypt.GetKmsProviders(context.Background())
2237-
assert.ErrorContains(mt, err, "Client.Timeout or context cancellation while reading body")
2237+
2238+
possibleErrors := []string{
2239+
"error reading response body: context deadline exceeded", // <= 1.19 + RHEL & macOS
2240+
"Client.Timeout or context cancellation while reading body", // > 1.20 on all OS
2241+
}
2242+
2243+
assert.True(t, containsSubstring(possibleErrors, err.Error()),
2244+
"expected possibleErrors=%v to contain %v, but it didn't",
2245+
possibleErrors, err.Error())
22382246
})
22392247
})
22402248

0 commit comments

Comments
 (0)