Skip to content

Commit ae8094d

Browse files
committed
update test with sa condition error
Signed-off-by: rashmi_kh <[email protected]>
1 parent 03187f4 commit ae8094d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/controllers/clusterextension_controller_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,8 @@ func TestClusterExtensionInstallationFailsWithNoServiceAccount(t *testing.T) {
743743
t.Log("By checking the status fields")
744744
require.Equal(t, ocv1.BundleMetadata{Name: "prometheus.v1.0.0", Version: "1.0.0"}, clusterExtension.Status.Install.Bundle)
745745
res, err = reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: extKey})
746-
require.Error(t, err, res)
746+
require.Error(t, err)
747+
require.Contains(t, err.Error(), "service account", "Expected error about missing ServiceAccount but got: %v", err)
747748

748749
t.Log("By checking the expected installed conditions")
749750
installedCond := apimeta.FindStatusCondition(clusterExtension.Status.Conditions, ocv1.TypeInstalled)

0 commit comments

Comments
 (0)