Skip to content

Commit

Permalink
Add validation test case
Browse files Browse the repository at this point in the history
  • Loading branch information
grischperl committed Nov 21, 2023
1 parent 75652ae commit d815896
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,21 @@ func Test_Validate_UpdateNATS(t *testing.T) {
},
wantErrMsg: "size cannot be reduced to 1 once it was >1",
},
{
name: `validation of cluster passes, if cluster.size>1 gets set to >1'`,
givenNATS: testutils.NewNATSCR(
testutils.WithNATSCluster(defaultCluster()),
),
wantMatches: gomega.And(
natsmatchers.HaveSpecCluster(defaultCluster()),
),
givenUpdates: []testutils.NATSOption{
testutils.WithNATSCluster(v1alpha1.Cluster{
Size: 5,
}),
},
wantErrMsg: noError,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit d815896

Please sign in to comment.