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

test (e2e) : Add test for checking crc status on a stopped crc cluster #4522

Conversation

rohanKanojia
Copy link
Contributor

Description

Related to #4512

While refactoring in #4480, I had mistakenly added this code that was checking for VM IP without checking the status of the VM .

Add integration test to verify that crc status works after user has run crc stop so that we don't run into this issue again in future.

Relates to: #4512, PR #4521

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Proposed changes

Add e2e test to verify crc status works on a stopped crc cluster

Testing

Contribution Checklist

  • I have read the contributing guidelines
  • My code follows the style guidelines of this project
  • I Keep It Small and Simple: The smaller the PR is, the easier it is to review and have it merged
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I tested my code on specified platforms
    • Linux
    • Windows
    • MacOS

Related to crc-org#4512

Add integration test to verify that crc status works after user has run
crc stop

Signed-off-by: Rohan Kumar <[email protected]>
Copy link

openshift-ci bot commented Dec 18, 2024

@rohanKanojia: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc 583d03f link true /test integration-crc
ci/prow/e2e-crc 583d03f link true /test e2e-crc

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-sigs/prow repository. I understand the commands that are listed here.

Copy link

openshift-ci bot commented Dec 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anjannath

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

@@ -61,6 +61,9 @@ Feature: Basic test
Then stdout should match "(.*)[Ss]topped the instance"
And executing "oc whoami" fails
And kubeconfig is cleaned up
# Given CRC Cluster is stopped, When crc status is executed, Then crc should report that cluster is stopped without throwing any error
When executing "crc status"
Then stdout should match "(.*)Stopped"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is basically what next step does "checking that CRC is stopped"

See

test/extended/crc/cmd/cmd.go
138 func CheckCRCStatus(state string) error {

Copy link
Contributor Author

@rohanKanojia rohanKanojia Dec 19, 2024

Choose a reason for hiding this comment

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

Oh, you're right.

This scenario was already covered in e2e tests.

@rohanKanojia rohanKanojia deleted the pr/test-stopped-crc-cluster-status branch December 19, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants