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

Refactor cmd_devfile_describe_test #5104

Merged

Conversation

valaparthvi
Copy link
Member

@valaparthvi valaparthvi commented Sep 30, 2021

What type of PR is this?
/kind tests

What does this PR do / why we need it:
This PR refactors the cmd_devfile_describe_test.go

Which issue(s) this PR fixes:

Fixes part of #5036

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Oct 1, 2021

✔️ Deploy Preview for odo-docusaurus-preview ready!

🔨 Explore the source changes: c0145fe

🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/61571bc2a212cb0008c8df33

😎 Browse the preview: https://deploy-preview-5104--odo-docusaurus-preview.netlify.app

@valaparthvi
Copy link
Member Author

/test psi-kubernetes-integration-e2e

@valaparthvi
Copy link
Member Author

/test psi-kubernetes-integration-e2e

Reason - failure seems unrelated to the PR changes

odo devfile storage command tests
[ssh:Fedora-32-minikube] /home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_5104/llyQL/repo/tests/integration/devfile/cmd_devfile_storage_test.go:14
[ssh:Fedora-32-minikube]   When ephemeral is set to false in preference.yaml
[ssh:Fedora-32-minikube]   /home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_5104/llyQL/repo/tests/integration/devfile/cmd_devfile_storage_test.go:342
[ssh:Fedora-32-minikube]     should create a pvc to store source code [It]
[ssh:Fedora-32-minikube]     /home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_5104/llyQL/repo/tests/integration/devfile/cmd_devfile_storage_test.go:343
[ssh:Fedora-32-minikube] 
[ssh:Fedora-32-minikube]     No future change is possible.  Bailing out early after 0.213s.
      
[ssh:Fedora-32-minikube]     Running odo with args [odo create nodejs bvycek --context /tmp/371357423 --project cmd-devfile-storage-test343fbh]
[ssh:Fedora-32-minikube]     Expected
[ssh:Fedora-32-minikube]         <int>: 1
[ssh:Fedora-32-minikube]     to match exit code:
[ssh:Fedora-32-minikube]         <int>: 0 

 [ssh:Fedora-32-minikube] [odo] 2021/10/04 13:04:37 protocol error: received *http.http2GoAwayFrame before a SETTINGS frame
[ssh:Fedora-32-minikube] [odo]  ✗  Failed to pull stack nodejs from registry.stage.devfile.io/devfile-catalog/nodejs:latest with allowed media types [application/vnd.devfileio.devfile.layer.v1 image/png image/svg+xml application/vnd.devfileio.vsx.layer.v1.tar application/x-tar]: failed to do request: Head "https://registry.stage.devfile.io/v2/devfile-catalog/nodejs/manifests/latest": connection error: PROTOCOL_ERROR 

output = helper.Cmd("odo", "describe", "--context", commonVar.Context, "-o", "json").ShouldPass().Out()
values = gjson.GetMany(output, "kind", "metadata.name", "status.state")
Expect(helper.GjsonMatcher(values, []string{"Component", "nodejs", "Pushed"})).To(Equal(true))
When("executing odo describe from a disconnected cluster", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

To get something similar to the test before, you could write:

When("creating a component", func() {

  It("should execute odo describe sucessfully from a disconnect cluster", func() {

    By("getting human readable output", func() { ... })

    By("getting json output", func() { ... })

@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 2021

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
2.1% 2.1% Duplication

@feloy
Copy link
Contributor

feloy commented Oct 7, 2021

/lgtm
/approve

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

openshift-ci bot commented Oct 7, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feloy

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 Oct 7, 2021
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link

openshift-ci bot commented Oct 7, 2021

@valaparthvi: 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/psi-k8s-ibmc-integration-e2e c0145fe link false /test psi-k8s-ibmc-integration-e2e
ci/prow/psi-unit-test-windows 612237c link false /test psi-unit-test-windows

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.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit dcf933e into redhat-developer:main Oct 7, 2021
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.

None yet

4 participants