Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(e2e): Tekton test permission failure with olm install command #5505

Merged
merged 1 commit into from
May 16, 2024

Conversation

gansheer
Copy link
Contributor

Description

When running on an OLM install on OCP the test fails with the following log from the Kamel Pod:

Error: OLM is available but current user has not enough permissions to create the operator. You can either ask your administrator to provide permissions (preferred) or run the install command with the '--olm=false' flag

Release Note

fix(e2e): Tekton test permission failure with olm install command

@gansheer
Copy link
Contributor Author

@squakez My feeling on the test is that we don't want to confirm so much that the pod can run the kamel install command than it can actually run a CLI command.
Can you confirm my intuition?

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is fine. However the test is wrong IMO. Feel free to take the opportunity to rewrite the test in this occasion or you can merge this and create a follow up issue in order to work on a more complete solution. Thanks!

@@ -42,7 +42,7 @@ func TestTektonLikeBehavior(t *testing.T) {
g.Expect(CreateOperatorRoleBinding(t, ctx, ns)).To(Succeed())

g.Eventually(OperatorPod(t, ctx, ns)).Should(BeNil())
g.Expect(CreateKamelPod(t, ctx, ns, "tekton-task", "install", "--skip-cluster-setup", "--force")).To(Succeed())
g.Expect(CreateKamelPod(t, ctx, ns, "tekton-task", "install", "--skip-cluster-setup", "--olm=false", "--force")).To(Succeed())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this test should be rewritten from scratch. Here what we're doing is to create a Pod with the operator container and we're asking the Pod to execute kamel install ... just to verify the executable works. I think that the kamel install should not be used as for this purpose. Instead, we should rewrite the test in order to validate something different, for instance kamel run which is what we really expect to use in a Tekton task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. That explains why I was confused about the purpose of this test. I will merge the current e2e test and write a follow up issue.

@gansheer gansheer merged commit 233c71e into apache:main May 16, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants