-
Notifications
You must be signed in to change notification settings - Fork 27
e2e: Allow running against an existing deployment #276
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
Conversation
I think it would be good to add this to the testing documentation somewhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code makes sense. Still walking through running it locally.
Do I need to do a catalog-deploy to test this change? I attempted to run make e2e
against an operator installed with 0.1.24 and ended up with:
=== RUN TestFileIntegrityLogAndReinitDatabase
helpers.go:265: failed to initialize cluster resources: serviceaccounts "file-integrity-daemon" already exists
--- FAIL: TestFileIntegrityLogAndReinitDatabase (45.28s)
Oh yeah, 0.1.24 has the old bundle with SA in it. But, this will be running in CI against future PR heads, which is .30+, so I won't worry about it. |
- Add TEST_BUNDLE_INSTALL env variable that makes the e2e suite skip initialization of the cluster and operator resources for each test case. This allows running the e2e suite against an existing deployment in a single namespace (such as an OLM install) when used together with TEST_WATCH_NAMESPACE and TEST_OPERATOR_NAMESPACE. - Add a test case cleanup step to kill the operator pod when TEST_BUNDLE_INSTALL is used. This resets the metrics counter for subsequent tests.
Running the e2e suite normally handles the operator deployment for each test case. The e2e suite can also be run against an existing deployment with the `TEST_BUNDLE_INSTALL` variable (set to `1` or `true`). The following example builds development images including the bundle and catalog, deploys them to a running cluster, and executes the e2e suite against the deployment. | ||
``` | ||
$ export IMAGE_REPO=myrepo | ||
$ export TAG=testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are technically optional, right? Someone could install from OperatorHub, or quay.io/file-integrity-operator, and things would still work (I installed 0.1.24 from OperatorHub and it's working).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, though in this example is that it's testing development images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrogers950, rhmdnd 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:
Approvers can indicate their approval by writing |
/retest Failed waiting for the environment to come up |
@mrogers950: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
TEST_BUNDLE_INSTALL
env variable that makes the e2e suite skip initialization of the cluster and operator resources for each test case. This allows running the e2e suite against an existing deployment in a single namespace (such as an OLM install) when used together withTEST_WATCH_NAMESPACE
andTEST_OPERATOR_NAMESPACE
.TEST_BUNDLE_INSTALL
is used. This resets the metrics counter for subsequent tests.Test with:
ref: openshift/release#30613
fixes: #269