Skip to content

Commit 152d3d8

Browse files
committed
fix test
1 parent 1e7bfaf commit 152d3d8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

controllers/operator/mongodbshardedcluster_controller_multi_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,12 +3589,32 @@ func getMultiClusterFQDN(stsName string, namespace string, clusterIdx int, podId
35893589

35903590
func generateExpectedDeploymentState(t *testing.T, sc *mdbv1.MongoDB) string {
35913591
lastSpec, _ := sc.GetLastSpec()
3592+
3593+
expectedProcessIds := om.ReplicaSetToProcessIds{
3594+
"slaney-0": om.ProcessNameToId{
3595+
"slaney-0-0": 0,
3596+
"slaney-0-1": 1,
3597+
"slaney-0-2": 2,
3598+
},
3599+
"slaney-1": om.ProcessNameToId{
3600+
"slaney-1-0": 0,
3601+
"slaney-1-1": 1,
3602+
"slaney-1-2": 2,
3603+
},
3604+
"slaney-config": om.ProcessNameToId{
3605+
"slaney-config-0": 0,
3606+
"slaney-config-1": 1,
3607+
"slaney-config-2": 2,
3608+
},
3609+
}
3610+
35923611
expectedState := ShardedClusterDeploymentState{
35933612
CommonDeploymentState: CommonDeploymentState{
35943613
ClusterMapping: map[string]int{},
35953614
},
35963615
LastAchievedSpec: lastSpec,
35973616
Status: &sc.Status,
3617+
ProcessIds: expectedProcessIds,
35983618
}
35993619
lastSpecBytes, err := json.Marshal(expectedState)
36003620
require.NoError(t, err)

0 commit comments

Comments
 (0)