Skip to content

Commit

Permalink
GDORIVER-2934 Add list of possible OS and Go dep errors to case 6 (#1535
Browse files Browse the repository at this point in the history
)
  • Loading branch information
prestonvasquez authored and qingyang-hu committed May 8, 2024
1 parent 132958b commit 9ba99ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mongo/integration/client_side_encryption_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,15 @@ func TestClientSideEncryptionProse(t *testing.T) {
crypt, err := mongocrypt.NewMongoCrypt(opts)
assert.Nil(mt, err, "error in NewMongoCrypt: %v", err)
_, err = crypt.GetKmsProviders(context.Background())
assert.ErrorContains(mt, err, "Client.Timeout or context cancellation while reading body")

possibleErrors := []string{
"error reading response body: context deadline exceeded", // <= 1.19 + RHEL & macOS
"Client.Timeout or context cancellation while reading body", // > 1.20 on all OS
}

assert.True(t, containsSubstring(possibleErrors, err.Error()),
"expected possibleErrors=%v to contain %v, but it didn't",
possibleErrors, err.Error())
})
})

Expand Down

0 comments on commit 9ba99ba

Please sign in to comment.