Skip to content

Commit

Permalink
remove confusing error message
Browse files Browse the repository at this point in the history
  • Loading branch information
chilagrow committed Mar 12, 2024
1 parent fcf8445 commit 004abe6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions integration/commands_authentication_test.go
Expand Up @@ -36,7 +36,7 @@ func TestCommandsAuthenticationLogout(t *testing.T) {

opts := options.Client().ApplyURI(s.MongoDBURI)
client, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

t.Cleanup(func() {
require.NoError(t, client.Disconnect(ctx))
Expand Down Expand Up @@ -90,7 +90,7 @@ func TestCommandsAuthenticationLogoutAuthenticatedUser(t *testing.T) {

opts := options.Client().ApplyURI(s.MongoDBURI).SetAuth(credential)
client, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

t.Cleanup(func() {
require.NoError(t, client.Disconnect(ctx))
Expand Down
12 changes: 6 additions & 6 deletions integration/users/connection_test.go
Expand Up @@ -207,7 +207,7 @@ func TestAuthentication(t *testing.T) {
opts := options.Client().ApplyURI(s.MongoDBURI).SetAuth(credential)

client, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

// Ping to force connection to be established and tested.
err = client.Ping(ctx, nil)
Expand All @@ -222,7 +222,7 @@ func TestAuthentication(t *testing.T) {
return
}

require.NoError(t, err, "cannot ping MongoDB")
require.NoError(t, err)

connCollection := client.Database(db.Name()).Collection(collection.Name())

Expand Down Expand Up @@ -268,7 +268,7 @@ func TestAuthenticationOnAuthenticatedConnection(t *testing.T) {
opts := options.Client().ApplyURI(s.MongoDBURI).SetAuth(credential)

client, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

t.Cleanup(func() {
require.NoError(t, client.Disconnect(ctx))
Expand Down Expand Up @@ -336,7 +336,7 @@ func TestAuthenticationLocalhostException(tt *testing.T) {

opts := options.Client().ApplyURI(s.MongoDBURI)
clientNoAuth, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

t.Cleanup(func() {
require.NoError(t, clientNoAuth.Disconnect(ctx))
Expand Down Expand Up @@ -377,7 +377,7 @@ func TestAuthenticationLocalhostException(tt *testing.T) {
opts = options.Client().ApplyURI(s.MongoDBURI).SetAuth(credential)

client, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

t.Cleanup(func() {
require.NoError(t, client.Disconnect(ctx))
Expand Down Expand Up @@ -471,7 +471,7 @@ func TestAuthenticationEnableNewAuthPLAIN(tt *testing.T) {
opts := options.Client().ApplyURI(s.MongoDBURI).SetAuth(credential)

client, err := mongo.Connect(ctx, opts)
require.NoError(t, err, "cannot connect to MongoDB")
require.NoError(t, err)

t.Cleanup(func() {
require.NoError(t, client.Disconnect(ctx))
Expand Down

0 comments on commit 004abe6

Please sign in to comment.