Skip to content

Commit aa0dc82

Browse files
committed
rename force-wireproto annotation
1 parent 326ad85 commit aa0dc82

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

api/v1/search/mongodbsearch_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
MongotDefautHealthCheckPort = 8080
2424
MongotDefaultSyncSourceUsername = "search-sync-source"
2525

26-
ForceWireprotoTransportAnnotation = "mongodb.com/v1.force-wireproto-transport"
26+
ForceWireprotoAnnotation = "mongodb.com/v1.force-search-wireproto"
2727
)
2828

2929
func init() {
@@ -253,7 +253,7 @@ func (s *MongoDBSearch) GetLogLevel() mdb.LogLevel {
253253
// wireproto server. Once the deprecated wireproto server is removed, this function, annotation, and all code guarded
254254
// by this check should be removed.
255255
func (s *MongoDBSearch) IsWireprotoEnabled() bool {
256-
val, ok := s.Annotations[ForceWireprotoTransportAnnotation]
256+
val, ok := s.Annotations[ForceWireprotoAnnotation]
257257
return ok && val == "true"
258258
}
259259

controllers/operator/mongodbsearch_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func TestMongoDBSearchReconcile_Success(t *testing.T) {
199199
search := newMongoDBSearch("search", mock.TestNamespace, "mdb")
200200
search.Spec.LogLevel = "WARN"
201201
search.Annotations = map[string]string{
202-
searchv1.ForceWireprotoTransportAnnotation: strconv.FormatBool(tc.withWireproto),
202+
searchv1.ForceWireprotoAnnotation: strconv.FormatBool(tc.withWireproto),
203203
}
204204

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

controllers/searchcontroller/mongodbsearch_reconcile_helper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func TestGetMongodConfigParameters_TransportAndPorts(t *testing.T) {
176176
},
177177
}
178178
if tc.withWireproto {
179-
search.Annotations = map[string]string{searchv1.ForceWireprotoTransportAnnotation: "true"}
179+
search.Annotations = map[string]string{searchv1.ForceWireprotoAnnotation: "true"}
180180
}
181181

182182
clusterDomain := "cluster.local"

0 commit comments

Comments
 (0)