-
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
Refactor devfile delete tests and add validity checks for delete command #4793
Refactor devfile delete tests and add validity checks for delete command #4793
Conversation
8cb5283
to
921e5ed
Compare
921e5ed
to
f273413
Compare
f273413
to
01411bc
Compare
/test v4.7-integration-e2e Reason -
|
|
||
commonVar.CliRunner.WaitAndCheckForExistence("deployments", commonVar.Project, 1) | ||
Context("deleting a component from other component directory", 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.
Describe seems more appropriate here
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.
Is it alright to nest Describe inside a Context block?
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.
Yes, for me it's alright. Describes explains what we are testing in a high level, Context explains how we are testing it
https://onsi.github.io/ginkgo/#organizing-specs-with-containers-describe-and-context
helper.CmdShouldPass("odo", "push", "--project", commonVar.Project) | ||
}) | ||
JustAfterEach(func() {}) | ||
Context("delete with --context flag", 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.
Is this information/Context necessary?
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 am not sure whether I understand your question correctly, but if what you mean to ask is whether we need a separate ginkgo.Context for this, then I would say yes, because in order to test this command with --context
flag correctly, we either need to create /move to a new directory or move out of the component's directory.
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.
In line 246, you are using this Context, because you are changing the current directory in JustBeforeEach, which is fine.
But here, there is no JustBeforeEach, so the context would not change.
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.
Oh right right, it doesn't make much sense to have that Context. I'll remove it, thanks.
/lgtm |
/retest |
1 similar comment
/retest |
/test psi-unit-test-mac |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: girishramnani 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 Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/override ci/prow/psi-unit-test-mac |
@valaparthvi: Overrode contexts on behalf of valaparthvi: ci/prow/psi-unit-test-mac 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. |
What type of PR is this?
/kind cleanup
/kind code-refactoring
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #4451
PR acceptance criteria:
Unit test
Integration test
Documentation
Update changelog
I have read the test guidelines
How to test changes / Special notes to the reviewer: