Skip to content

Commit a4dfccb

Browse files
committed
add OperatorGroup sync unit test
Signed-off-by: akihikokuroda <[email protected]>
1 parent bb88197 commit a4dfccb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pkg/controller/operators/catalog/operator_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,11 +1364,11 @@ func TestValidateExistingCRs(t *testing.T) {
13641364
func TestSyncOperatorGroup(t *testing.T) {
13651365
namespace := "ns"
13661366
inOperatorGroup := operatorGroup("og", "sa", namespace,
1367-
&corev1.ObjectReference{
1368-
Kind: "ServiceAccount",
1369-
Namespace: namespace,
1370-
Name: "sa",
1371-
})
1367+
&corev1.ObjectReference{
1368+
Kind: "ServiceAccount",
1369+
Namespace: namespace,
1370+
Name: "sa",
1371+
})
13721372
tests := []struct {
13731373
testName string
13741374
err error
@@ -1378,26 +1378,26 @@ func TestSyncOperatorGroup(t *testing.T) {
13781378
clientObjs []runtime.Object
13791379
}{
13801380
{
1381-
testName: "OnComplete",
1382-
in: inOperatorGroup,
1381+
testName: "OnComplete",
1382+
in: inOperatorGroup,
13831383
clientObjs: []runtime.Object{
13841384
installPlan("p", namespace, v1alpha1.InstallPlanPhaseComplete, "csv"),
13851385
},
13861386
err: nil,
13871387
expectedPhase: v1alpha1.InstallPlanPhaseInstalling,
13881388
expectedCondition: &v1alpha1.InstallPlanCondition{Type: v1alpha1.InstallPlanInstalled, Status: corev1.ConditionFalse, Reason: v1alpha1.InstallPlanReasonComponentFailed,
1389-
Message: "OperatorGroup updated"},
1389+
Message: "OperatorGroup updated"},
13901390
},
13911391
{
1392-
testName: "OnOnstalling",
1393-
in: inOperatorGroup,
1392+
testName: "OnOnstalling",
1393+
in: inOperatorGroup,
13941394
clientObjs: []runtime.Object{
13951395
installPlan("p", namespace, v1alpha1.InstallPlanPhaseNone, "csv"),
13961396
},
13971397
err: nil,
13981398
expectedPhase: v1alpha1.InstallPlanPhaseInstalling,
13991399
expectedCondition: &v1alpha1.InstallPlanCondition{Type: v1alpha1.InstallPlanInstalled, Status: corev1.ConditionFalse, Reason: v1alpha1.InstallPlanReasonComponentFailed,
1400-
Message: "OperatorGroup updated"},
1400+
Message: "OperatorGroup updated"},
14011401
},
14021402
}
14031403

0 commit comments

Comments
 (0)