diff --git a/mongo/client_test.go b/mongo/client_test.go index e1e8f322a8..d4aeaeacd3 100644 --- a/mongo/client_test.go +++ b/mongo/client_test.go @@ -23,6 +23,7 @@ import ( "go.mongodb.org/mongo-driver/mongo/readpref" "go.mongodb.org/mongo-driver/mongo/writeconcern" "go.mongodb.org/mongo-driver/tag" + "go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt" "go.mongodb.org/mongo-driver/x/mongo/driver/session" "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) @@ -443,6 +444,9 @@ func TestClient(t *testing.T) { if cryptSharedLibPath == "" { t.Skip("CRYPT_SHARED_LIB_PATH not set, skipping") } + if len(mongocrypt.Version()) == 0 { + t.Skip("Not built with cse flag") + } testCases := []struct { description string