Skip to content

Commit 1d1ab6f

Browse files
test/e2e: update expectations for permissions problem on install plan
Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent f84ac84 commit 1d1ab6f

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

test/e2e/installplan_e2e_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3931,7 +3931,7 @@ func buildInstallPlanMessageCheckFunc(substring string) checkInstallPlanFunc {
39313931
lastTime := time.Now()
39323932
return func(fip *operatorsv1alpha1.InstallPlan) bool {
39333933
if fip.Status.Message != lastMessage {
3934-
ctx.Ctx().Logf("waiting %s for installplan %s/%s to have message substring %s, have message %s", time.Since(lastTime), fip.Namespace, fip.Name, substring, fip.Status.Phase)
3934+
ctx.Ctx().Logf("waiting %s for installplan %s/%s to have message substring %q, have message %q", time.Since(lastTime), fip.Namespace, fip.Name, substring, fip.Status.Message)
39353935
lastMessage = fip.Status.Message
39363936
lastTime = time.Now()
39373937
}

test/e2e/user_defined_sa_test.go

+2-7
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,12 @@ var _ = Describe("User defined service account", func() {
8181
require.NoError(GinkgoT(), err)
8282
require.NotNil(GinkgoT(), subscription)
8383

84-
By("We expect the InstallPlan to be in status: Failed.")
84+
By("We expect the InstallPlan to be in status: Installing.")
8585
ipName := subscription.Status.Install.Name
8686
ipPhaseCheckerFunc := buildInstallPlanMessageCheckFunc(`cannot create resource`)
8787
ipGot, err := fetchInstallPlanWithNamespace(GinkgoT(), crc, ipName, generatedNamespace.GetName(), ipPhaseCheckerFunc)
8888
require.NoError(GinkgoT(), err)
89-
90-
conditionGot := mustHaveCondition(GinkgoT(), ipGot, v1alpha1.InstallPlanInstalled)
91-
assert.Equal(GinkgoT(), corev1.ConditionFalse, conditionGot.Status)
92-
assert.Equal(GinkgoT(), v1alpha1.InstallPlanReasonComponentFailed, conditionGot.Reason)
93-
assert.Contains(GinkgoT(), conditionGot.Message, fmt.Sprintf("is forbidden: User \"system:serviceaccount:%s:%s\" cannot create resource", generatedNamespace.GetName(), saName))
94-
89+
9590
By("Verify that all step resources are in Unknown state.")
9691
for _, step := range ipGot.Status.Plan {
9792
assert.Equal(GinkgoT(), v1alpha1.StepStatusUnknown, step.Status)

0 commit comments

Comments
 (0)