Skip to content

Commit

Permalink
tests: clarify the TestCreateSCCs test
Browse files Browse the repository at this point in the history
This test ensures that the SCCs are created during the reconcile.

Changing the logic to match the comments.

Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
  • Loading branch information
raghavendra-talur committed Apr 19, 2021
1 parent ffa55cb commit ef1d7ee
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -204,6 +204,7 @@ func TestCreateWatchedResource(t *testing.T) {
}
}

// TestCreateSCCs ensures that the reconciler creates the SCCs if they are missing.
func TestCreateSCCs(t *testing.T) {
testcases := []struct {
label string
Expand All @@ -223,7 +224,7 @@ func TestCreateSCCs(t *testing.T) {
ocs, request, reconciler := getTestParams(false, t)

if tc.sscCreated {
ocs.Status.SCCsCreated = false
ocs.Status.SCCsCreated = true
err := reconciler.Client.Update(context.TODO(), &ocs)
assert.NoErrorf(t, err, "[%s]: failed to update ocsInit status", tc.label)
}
Expand Down

0 comments on commit ef1d7ee

Please sign in to comment.