From dc64305e1382d658c5633ba72368e6eef9a3e164 Mon Sep 17 00:00:00 2001 From: chatton Date: Wed, 9 Jun 2021 21:42:25 +0100 Subject: [PATCH] ignore error --- api/v1/mongodbcommunity_types.go | 2 +- test/e2e/mongodbtests/mongodbtests.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/v1/mongodbcommunity_types.go b/api/v1/mongodbcommunity_types.go index 5a353e12a..8131e9a1c 100644 --- a/api/v1/mongodbcommunity_types.go +++ b/api/v1/mongodbcommunity_types.go @@ -339,7 +339,7 @@ type Authentication struct { // +optional // +kubebuilder:default:=true // +nullable - IgnoreUnknownUsers *bool `json:"ignoreUnknownUsers"` + IgnoreUnknownUsers *bool `json:"ignoreUnknownUsers,omitempty"` } // +kubebuilder:validation:Enum=SCRAM diff --git a/test/e2e/mongodbtests/mongodbtests.go b/test/e2e/mongodbtests/mongodbtests.go index 6dce668c3..9a6bcdfd3 100644 --- a/test/e2e/mongodbtests/mongodbtests.go +++ b/test/e2e/mongodbtests/mongodbtests.go @@ -4,10 +4,11 @@ import ( "context" "encoding/json" "fmt" - "github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/container" "testing" "time" + "github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/container" + mdbv1 "github.com/mongodb/mongodb-kubernetes-operator/api/v1" "github.com/mongodb/mongodb-kubernetes-operator/pkg/authentication/scram" "github.com/mongodb/mongodb-kubernetes-operator/pkg/automationconfig" @@ -32,7 +33,7 @@ func SkipTestIfLocal(t *testing.T, msg string, f func(t *testing.T)) { // StatefulSetBecomesReady ensures that the underlying stateful set // reaches the running state. func StatefulSetBecomesReady(mdb *mdbv1.MongoDBCommunity) func(t *testing.T) { - return statefulSetIsReady(mdb, time.Second*15, time.Minute*12) + return statefulSetIsReady(mdb, time.Second*15, time.Minute*15) } // StatefulSetBecomesUnready ensures the underlying stateful set reaches @@ -214,11 +215,11 @@ func CreateMongoDBResource(mdb *mdbv1.MongoDBCommunity, ctx *e2eutil.Context) fu } } -// GetConnectionStringSecret returnes the secret generated by the operator that is storing the connection string for a specific user +// GetConnectionStringSecret returns the secret generated by the operator that is storing the connection string for a specific user. func GetConnectionStringSecret(mdb mdbv1.MongoDBCommunity, user scram.User) corev1.Secret { secret := corev1.Secret{} secretNamespacedName := types.NamespacedName{Name: user.GetConnectionStringSecretName(mdb), Namespace: mdb.Namespace} - e2eutil.TestClient.Get(context.TODO(), secretNamespacedName, &secret) + _ = e2eutil.TestClient.Get(context.TODO(), secretNamespacedName, &secret) return secret }