-
Notifications
You must be signed in to change notification settings - Fork 244
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 cleanup after odo dev terminates #5633
Tests cleanup after odo dev terminates #5633
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
// An ENV file should have been created indicating current namespace | ||
Expect(helper.VerifyFileExists(".odo/env/env.yaml")).To(BeTrue()) | ||
helper.FileShouldContainSubstring(".odo/env/env.yaml", "Project: "+commonVar.Project) | ||
}) | ||
|
||
AfterEach(func() { | ||
devSession.Kill() |
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.
session.Kill() will not cleanup the resources, will it? We'll need to run session.Stop() for this, no?
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.
We don't particularly need to cleanup resources at this point (this will be done when deleting the namespace), but to be consistent with the other tests, let's use Stop()
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.
Reverting to Kill
as Stop
would need a WaitEnd()
but it is not necessary, and adding some comment on the reason why killing the process is necessary
@@ -275,8 +279,9 @@ var _ = Describe("odo dev command tests", func() { | |||
}) | |||
}) | |||
|
|||
When("running odo delete component --wait", func() { | |||
When("killing odo dev and running odo delete component --wait", func() { |
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.
Don't you think this test is more appropriate for cmd_delete_test.go?
Or, to keep it more inline with the following test, check instead that it does not delete the resources.?
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.
I find interesting to place it here as we can see the similarity with the test when stopping odo dev normally
96d95d4
to
3407c8f
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anandrkskd 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 |
/override ci/prow/v4.10-integration-e2e IBM tests are passing |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.10-integration-e2e In response to this:
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. |
* Tests cleanup after odo dev terminates * Stop all dev sessions to not have remaining odo processes after tests * Add some comment on session.Kill
What type of PR is this:
/kind tests
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes partially #5621
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: