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 cleanup after odo dev terminates #5633

Merged

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Apr 6, 2022

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:

@netlify
Copy link

netlify bot commented Apr 6, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 23ed029
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/624eba7769f8a200094b38ff

@openshift-ci openshift-ci bot requested review from dharmit and valaparthvi April 6, 2022 08:13
@odo-robot
Copy link

odo-robot bot commented Apr 6, 2022

Unit Tests on commit eb56bd6 finished successfully.
View logs: TXT HTML

@feloy feloy requested review from rm3l and removed request for dharmit April 6, 2022 08:26
@odo-robot
Copy link

odo-robot bot commented Apr 6, 2022

OpenShift Tests on commit eb56bd6 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 6, 2022

Kubernetes Tests on commit eb56bd6 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Apr 6, 2022

Validate Tests on commit eb56bd6 finished successfully.
View logs: TXT HTML

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 6, 2022
// 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()
Copy link
Contributor

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?

Copy link
Contributor Author

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()

Copy link
Contributor Author

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() {
Copy link
Contributor

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.?

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 find interesting to place it here as we can see the similarity with the test when stopping odo dev normally

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 7, 2022
@feloy feloy requested a review from valaparthvi April 7, 2022 07:45
@feloy feloy force-pushed the test-odo-dev-cleanup branch from 96d95d4 to 3407c8f Compare April 7, 2022 10:15
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@anandrkskd
Copy link
Contributor

/approve

@anandrkskd
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 11, 2022
@openshift-ci
Copy link

openshift-ci bot commented Apr 11, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Apr 11, 2022
@feloy
Copy link
Contributor Author

feloy commented Apr 11, 2022

/override ci/prow/v4.10-integration-e2e

IBM tests are passing

@openshift-ci
Copy link

openshift-ci bot commented Apr 11, 2022

@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.10-integration-e2e

In response to this:

/override ci/prow/v4.10-integration-e2e

IBM tests are passing

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.

@openshift-merge-robot openshift-merge-robot merged commit 08f0fd3 into redhat-developer:main Apr 11, 2022
@feloy feloy mentioned this pull request Apr 11, 2022
3 tasks
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
* Tests cleanup after odo dev terminates

* Stop all dev sessions to not have remaining odo processes after tests

* Add some comment on session.Kill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants