Skip to content

Commit

Permalink
test: Updated TestUpdateStatefulSet
Browse files Browse the repository at this point in the history
Signed-off-by: Mahesh Kumar <[email protected]>
  • Loading branch information
k3mahesh committed Apr 8, 2024
1 parent d52ce6c commit 5fb8368
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions k8sutils/statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ func TestUpdateStatefulSet(t *testing.T) {
updatedStsSpec appsv1.StatefulSetSpec
recreateSts bool
stsPresent bool
errorExpected bool
}{
{
name: "Update StatefulSet without recreate in existing Statefulset",
Expand All @@ -306,9 +305,8 @@ func TestUpdateStatefulSet(t *testing.T) {
updatedStsSpec: appsv1.StatefulSetSpec{
Replicas: ptrInt32(5),
},
recreateSts: false,
stsPresent: true,
errorExpected: false,
recreateSts: false,
stsPresent: true,
},
{
name: "Update StatefulSet with recreate in existing Statefulset",
Expand All @@ -318,9 +316,8 @@ func TestUpdateStatefulSet(t *testing.T) {
updatedStsSpec: appsv1.StatefulSetSpec{
Replicas: ptrInt32(4),
},
recreateSts: true,
stsPresent: true,
errorExpected: false,
recreateSts: true,
stsPresent: true,
},
{
name: "Update StatefulSet without recreate StatefulSet is not present",
Expand All @@ -330,9 +327,8 @@ func TestUpdateStatefulSet(t *testing.T) {
updatedStsSpec: appsv1.StatefulSetSpec{
Replicas: ptrInt32(4),
},
recreateSts: false,
stsPresent: false,
errorExpected: false,
recreateSts: false,
stsPresent: false,
},
{
name: "Update StatefulSet without recreate StatefulSet",
Expand All @@ -354,9 +350,8 @@ func TestUpdateStatefulSet(t *testing.T) {
},
},
},
recreateSts: false,
stsPresent: true,
errorExpected: false,
recreateSts: false,
stsPresent: true,
},
}

Expand Down

0 comments on commit 5fb8368

Please sign in to comment.