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

OCM-8679 | test: automated case id:72868 Separate the component route options when updating ingress #2157

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

valeriiashapoval
Copy link

[valeriiashapoval@fedora rosa]$ ginkgo -focus 72868 tests/e2e/
Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
  Ginkgo CLI Version:
    2.14.0
  Mismatched package versions found:
    2.17.1 used by e2e

  Ginkgo will continue to attempt to run but you may see errors (including flag
  parsing errors) and should either update your go.mod or your version of the
  Ginkgo CLI to match.

  To install the matching version of the CLI run
    go install github.com/onsi/ginkgo/v2/ginkgo
  from a path that contains a go.mod file.  Alternatively you can use
    go run github.com/onsi/ginkgo/v2/ginkgo
  from a path that contains a go.mod file to invoke the matching version of the
  Ginkgo CLI.

  If you are attempting to test multiple packages that each have a different
  version of the Ginkgo library with a single Ginkgo CLI that is currently
  unsupported.
  
Running Suite: ROSA CLI e2e tests suite - /home/valeriiashapoval/rosa/tests/e2e
===============================================================================
Random Seed: 1718015934

Will run 3 of 102 specs
SSSSSSSSSSSS•••SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Ran 3 of 102 Specs in 72.583 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 99 Skipped
PASS

Ginkgo ran 1 suite in 1m16.88734553s
Test Suite Passed

Link to Test Cases

@openshift-ci openshift-ci bot requested review from mgahagan73 and yuwang-RH June 10, 2024 13:58
Copy link
Contributor

openshift-ci bot commented Jun 10, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: valeriiashapoval
Once this PR has been reviewed and has the lgtm label, please assign xueli181114 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@xueli181114
Copy link
Contributor

Please rebase and update the commit message. The title and commit message should be
OCM-8679 | test: automated case id:72868 Separate the component route options when updating ingress

"--component-routes", componentRoutes,
)
Expect(err).ToNot(HaveOccurred())
defer rosaClient.Ingress.EditIngress(clusterID,
Copy link
Contributor

Choose a reason for hiding this comment

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

Defer is used to recover the updated data, please not use hardcode but the recorded variable value

output, err = rosaClient.Ingress.ListIngress(clusterID)
Expect(err).ToNot(HaveOccurred())
})
It("cannot update ingress components with incorrect syntax - [id:72868]",
Copy link
Contributor

Choose a reason for hiding this comment

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

Combine the It specs to only one. Our rule need to follow one case one It spec

Expect(err).ToNot(HaveOccurred())
})
It("cannot update ingress components with incorrect syntax - [id:72868]",
labels.Medium,
Copy link
Contributor

Choose a reason for hiding this comment

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

For the negative cases, they should be another negative case.

@ciaranRoche
Copy link
Member

@valeriiashapoval what is the current status of this MR, is it still valid?

@valeriiashapoval
Copy link
Author

@valeriiashapoval what is the current status of this MR, is it still valid?

@ciaranRoche yes, testing a few minor changes and rebasing.

@valeriiashapoval valeriiashapoval changed the title [OCM-8679] | test: Automate case id - OCP-72868 - Separate the component route options when updating ingress OCM-8679 | test: automated case id:72868 Separate the component route options when updating ingress Jul 17, 2024
Copy link
Contributor

openshift-ci bot commented Jul 17, 2024

@valeriiashapoval: 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/lint d603e69 link true /test lint
ci/prow/commits d603e69 link true /test commits
ci/prow/test d603e69 link true /test test

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.

"--component-routes", componentRoutes,
)
Expect(err).ToNot(HaveOccurred())

Copy link
Contributor

Choose a reason for hiding this comment

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

We usually define defer function to recover the updated value after the first edit command

)
Expect(err).ToNot(HaveOccurred())

_, err = rosaClient.Ingress.EditIngress(clusterID,
Copy link
Contributor

Choose a reason for hiding this comment

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

Edit ingress with same parameter called twice.


By("List ingress to check")
output, err = rosaClient.Ingress.ListIngress(clusterID)
Expect(err).ToNot(HaveOccurred())
Copy link
Contributor

Choose a reason for hiding this comment

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

Here just checked the error is not happening when list the ingress, but it didn't check the edited value showing

Expect(err).To(HaveOccurred())
Expect(output.String()).Should(ContainSubstring("An error occurred whilst parsing the supplied component routes: only the name of the component should be followed by ':'"))

By("List ingress to check")
Copy link
Contributor

Choose a reason for hiding this comment

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

If last steps is expecting an error happen, no need to list the ingress for double checking

Expect(err).To(HaveOccurred())
Expect(output.String()).Should(ContainSubstring("An error occurred whilst parsing the supplied component routes: the expected amount of component routes is 3, but 1 have been supplied"))

By("List ingress to check")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.92%. Comparing base (e86af7a) to head (d603e69).
Report is 689 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2157   +/-   ##
=======================================
  Coverage   26.92%   26.92%           
=======================================
  Files         151      151           
  Lines       21774    21774           
=======================================
  Hits         5862     5862           
  Misses      15462    15462           
  Partials      450      450           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 8, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants