diff --git a/pkg/apis/m3dboperator/v1alpha1/cluster_test.go b/pkg/apis/m3dboperator/v1alpha1/cluster_test.go index cdbe7d9..3d5e98f 100644 --- a/pkg/apis/m3dboperator/v1alpha1/cluster_test.go +++ b/pkg/apis/m3dboperator/v1alpha1/cluster_test.go @@ -39,8 +39,8 @@ func TestStatus(t *testing.T) { f: func(s *M3DBStatus) bool { return s.HasInitializedPlacement() }, }, { - cond: ClusterConditionPodBootstrapping, - f: func(s *M3DBStatus) bool { return s.HasPodBootstrapping() }, + cond: ClusterConditionPodsBootstrapping, + f: func(s *M3DBStatus) bool { return s.HasPodsBootstrapping() }, }, } { t.Run(string(test.cond), func(t *testing.T) { diff --git a/pkg/m3admin/placement/client_test.go b/pkg/m3admin/placement/client_test.go index a485a84..016eac0 100644 --- a/pkg/m3admin/placement/client_test.go +++ b/pkg/m3admin/placement/client_test.go @@ -90,7 +90,7 @@ func TestAdd(t *testing.T) { return } - const expected = `{"instances":[{"id":"a"}]}` + const expected = `{"instances":[{"id":"a"},{"id":"b"}]}` assert.Equal(t, expected, string(bytes)) w.WriteHeader(200) @@ -100,7 +100,10 @@ func TestAdd(t *testing.T) { defer s.Close() client := newPlacementClient(t, s.URL) - err := client.Add(placementpb.Instance{Id: "a"}) + err := client.Add([]*placementpb.Instance{ + {Id: "a"}, + {Id: "b"}, + }) require.Nil(t, err) } @@ -113,7 +116,7 @@ func TestAddErr(t *testing.T) { defer s.Close() client := newPlacementClient(t, s.URL) - err := client.Add(placementpb.Instance{}) + err := client.Add([]*placementpb.Instance{}) require.NotNil(t, err) }