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

Tests for feature toggles #1008

Merged
merged 26 commits into from
Jul 25, 2024

Conversation

alexeykazakov
Copy link
Contributor

@alexeykazakov alexeykazakov commented Jul 11, 2024

@alexeykazakov
Copy link
Contributor Author

/retest

@alexeykazakov
Copy link
Contributor Author

/retest

@alexeykazakov
Copy link
Contributor Author

/retest

Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Looks great 👍

I have only one minor comment.

I was also wondering if we are planning to add more scenarios later:

  • more features
  • different weights
  • different objects per feature

but I guess for now this is enough , since we are covered with the unit tests.

test/e2e/parallel/nstemplatetier_test.go Show resolved Hide resolved
testsupport/tiers/checks.go Outdated Show resolved Hide resolved
testsupport/wait/member.go Outdated Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Outdated Show resolved Hide resolved
@alexeykazakov
Copy link
Contributor Author

I was also wondering if we are planning to add more scenarios later:

more features
different weights
different objects per feature
but I guess for now this is enough , since we are covered with the unit tests.

All these cases are covered by unit tests. We could have multiple features in e2e-tests too but having any weight which is not 0 or 100 would be quite tricky to test properly. So I just wanted to cover the mechanism of enabling and disabling a feature in the e2e-tests and leave all possible combinations to unit tests.

@alexeykazakov
Copy link
Contributor Author

@mfrancisc @MatousJobanek thank you for the review! I addressed or replied to all the comments. Please take another look when you have time.

Copy link
Collaborator

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

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

It looks good, but please consider using the already existing generic Waiter type and its methods and expanding it if needed

testsupport/tiers/tier_setup.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rajivnathan rajivnathan left a comment

Choose a reason for hiding this comment

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

Nice! Just a couple minor comments

testsupport/wait/awaitility.go Outdated Show resolved Hide resolved
testsupport/wait/awaitility.go Show resolved Hide resolved
test/e2e/parallel/nstemplatetier_test.go Show resolved Hide resolved
Copy link

sonarcloud bot commented Jul 24, 2024

Copy link
Collaborator

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

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

Nice and clean 👍 🥇
Thanks 🚀

Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Nice Job 👍

Copy link
Contributor

@rajivnathan rajivnathan left a comment

Choose a reason for hiding this comment

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

Nice! 🚀

Copy link

openshift-ci bot commented Jul 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, MatousJobanek, mfrancisc, rajivnathan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [MatousJobanek,alexeykazakov,mfrancisc,rajivnathan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alexeykazakov alexeykazakov merged commit 20debb4 into codeready-toolchain:master Jul 25, 2024
8 of 9 checks passed
@alexeykazakov alexeykazakov deleted the osl-member branch July 25, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants