Skip to content

Commit c8202cc

Browse files
jkatzJonathan S. Katz
authored andcommitted
Tighter check for replica service in pgo test
The check looked to see if the word "replica" existed in one of the Service Labels, when really we shold be checking for a suffix of "replica". Issue: [ch9764] Issue: #2047
1 parent a79682a commit c8202cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/apiserver/clusterservice/clusterimpl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func TestCluster(name, selector, ns, pgouser string, allFlag bool) msgs.ClusterT
488488
switch {
489489
default:
490490
endpoint.InstanceType = msgs.ClusterTestInstanceTypePrimary
491-
case strings.Contains(service.Name, msgs.PodTypeReplica):
491+
case strings.HasSuffix(service.Name, msgs.PodTypeReplica):
492492
endpoint.InstanceType = msgs.ClusterTestInstanceTypeReplica
493493
case service.Pgbouncer:
494494
endpoint.InstanceType = msgs.ClusterTestInstanceTypePGBouncer

0 commit comments

Comments
 (0)