Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

KOGITO-953: Cucumber tests: Test OLM subscription #332

Closed
wants to merge 1 commit into from

Conversation

Sgitario
Copy link
Contributor

@Sgitario Sgitario commented May 4, 2020

JIRA Ticket: https://issues.redhat.com/browse/KOGITO-953
Description: Simple test for checking that OLM subscription is working on alpha and dev-preview channels.
This test will be executed as a post-release step. So, it's disabled now and marked with the tag @Release.

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Pull Request title is properly formatted: [KOGITO-XYZ] Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
  • Your feature/bug fix has a unit test that verifies it
  • You've tested the new feature/bug fix in an actual OpenShift cluster


Scenario Outline: Deploy Kogito Operator from subscription
When Kogito Operator is deployed from subscription using channel "<channel>"
Then Kogito Operator should be installed from subscription with dependencies
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This step will check that the installed version of the operator matches with the CSV version, otherwise it fails.

Copy link
Contributor

Choose a reason for hiding this comment

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

which CSV version is that ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The CSV version is checked from the subscription depending on the channel. It's using this method: https://github.com/kiegroup/kogito-cloud-operator/blob/c873d19970784825e8547f1367ee2649dfb2ab6f/pkg/infrastructure/operator.go#L61

@Sgitario
Copy link
Contributor Author

Sgitario commented May 4, 2020

I've ran the tests and they work fine. Should we mark them with @smoke as well? Or with @Release is enough?

@radtriste radtriste added bdd-tests 🧪 PR is related to the BDD test framework needs review 🔍 Pull Request that needs reviewers labels May 4, 2020
@sutaakar
Copy link
Contributor

sutaakar commented May 4, 2020

Isn't such test executed on OpenShift side when they accept the operator PR?

@@ -0,0 +1,17 @@
@disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

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 thought the tags were automatically injected. I've made some changes in regards of this, so we can define the custom tags (smoke, performance and now release).
With this change, we can now compose tags by for example, setting @smoke and another tag @performance altogether.


Scenario Outline: Deploy Kogito Operator from subscription
When Kogito Operator is deployed from subscription using channel "<channel>"
Then Kogito Operator should be installed from subscription with dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

which CSV version is that ?

@Sgitario
Copy link
Contributor Author

Sgitario commented May 5, 2020

Isn't such test executed on OpenShift side when they accept the operator PR?

If this is something that OpenShift does when they accept the operator, then we should not do this. What do you think @radtriste ?

type customTag struct {
Name string
IsEnabled func() bool
IgnoreIfDisabled bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be tricky as it's only used by the smoke tag because it's not excluded if it's not set. If smoke tag is set, we only run the smoke tests, if not set, we run all the tests (including smokes).
If this is too much, I can restore it as it was before, but I like the idea of having all the custom tag configurations in the same place to see/change behaviour when/if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

IgnoreIfDisabled => DisableIfNotSet

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 think both are tricky and a bit verbose. More ideas? IgnoreByDefault?

@Sgitario Sgitario requested a review from radtriste May 5, 2020 06:41
@sutaakar
Copy link
Contributor

sutaakar commented May 5, 2020

@spolti Do you know what checks are done when Kogito operator is added to the catalog (scorecard checks?)? Does it check whether the operator is successfully installed using OLM subscription?

@radtriste
Copy link
Contributor

AFAIK the scorecard is running checks before the csv is added to the OLM.
@spolti will add more details

@spolti
Copy link
Member

spolti commented May 6, 2020

@sutaakar @radtriste yeah, we run scorecard before push the new CSV.
When a PR is created on operator-framework/community-operators a few other tests are made, you can check all here: operator-framework/community-operators#1635

@Sgitario
Copy link
Contributor Author

Sgitario commented May 7, 2020

@sutaakar @radtriste yeah, we run scorecard before push the new CSV.
When a PR is created on operator-framework/community-operators a few other tests are made, you can check all here: operator-framework/community-operators#1635

If this is done, should we reject the JIRA and close this PR without merging?

@radtriste
Copy link
Contributor

I tried to remember why I opened this issue but cannot ... I think I just wanted to make sure we have the correct version set into the OperatorHub.

With a release automation pipeline, we should not need for such a check anyway I think.
Let's close it for now and see later if needed ...

@Sgitario
Copy link
Contributor Author

Sgitario commented May 7, 2020

No problem. Will close the PR without merging and reject the ticket.

@Sgitario Sgitario closed this May 7, 2020
@Sgitario Sgitario deleted the KOGITO-953 branch June 26, 2020 06:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bdd-tests 🧪 PR is related to the BDD test framework needs review 🔍 Pull Request that needs reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants