Skip to content

Commit 8dc3d81

Browse files
committed
cheat linter
1 parent 14bedcf commit 8dc3d81

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

controllers/operator/mongodbsearch_controller_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package operator
33
import (
44
"context"
55
"fmt"
6+
"strconv"
67
"testing"
78

89
"github.com/ghodss/yaml"
@@ -197,11 +198,8 @@ func TestMongoDBSearchReconcile_Success(t *testing.T) {
197198
t.Run(tc.name, func(t *testing.T) {
198199
search := newMongoDBSearch("search", mock.TestNamespace, "mdb")
199200
search.Spec.LogLevel = "WARN"
200-
if tc.withWireproto {
201-
if search.Annotations == nil {
202-
search.Annotations = map[string]string{}
203-
}
204-
search.Annotations[searchv1.ForceWireprotoTransportAnnotation] = "true"
201+
search.Annotations = map[string]string{
202+
searchv1.ForceWireprotoTransportAnnotation: strconv.FormatBool(tc.withWireproto),
205203
}
206204

207205
mdbc := newMongoDBCommunity("mdb", mock.TestNamespace)

0 commit comments

Comments
 (0)