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

e2e: fail on errors #63

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Sep 16, 2024

It would be more user friendly to fail on errors when running e2e tests.

Here is an example of how does make e2e behaves before and after this fix:

  • Before
$ make test-e2e
test/e2e/e2e.sh
dra-example-driver-cluster
NAME                                       STATUS   ROLES           AGE    VERSION
dra-example-driver-cluster-control-plane   Ready    control-plane   4d4h   v1.31.0
dra-example-driver-cluster-worker          Ready    <none>          4d4h   v1.31.0
node/dra-example-driver-cluster-worker condition met
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": namespaces "gpu-test1" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": resourceclaimtemplates.resource.k8s.io "single-gpu" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": pods "pod0" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": pods "pod1" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test2.yaml": namespaces "gpu-test2" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test2.yaml": resourceclaimtemplates.resource.k8s.io "multiple-gpus" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test2.yaml": pods "pod0" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test3.yaml": namespaces "gpu-test3" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test3.yaml": resourceclaimtemplates.resource.k8s.io "single-gpu" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test3.yaml": pods "pod0" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test4.yaml": namespaces "gpu-test4" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test4.yaml": resourceclaims.resource.k8s.io "single-gpu" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test4.yaml": pods "pod0" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test4.yaml": pods "pod1" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test5.yaml": namespaces "gpu-test5" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test5.yaml": resourceclaimtemplates.resource.k8s.io "multiple-gpus" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test5.yaml": pods "pod0" already exists
pod/pod0 condition met
pod/pod1 condition met
pod/pod0 condition met
pod/pod0 condition met
pod/pod0 condition met
pod/pod1 condition met
pod/pod0 condition met
test ran successfully
  • After
$ make test-e2e
test/e2e/e2e.sh
dra-example-driver-cluster
NAME                                       STATUS   ROLES           AGE    VERSION
dra-example-driver-cluster-control-plane   Ready    control-plane   4d4h   v1.31.0
dra-example-driver-cluster-worker          Ready    <none>          4d4h   v1.31.0
node/dra-example-driver-cluster-worker condition met
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": namespaces "gpu-test1" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": resourceclaimtemplates.resource.k8s.io "single-gpu" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": pods "pod0" already exists
Error from server (AlreadyExists): error when creating "demo/gpu-test1.yaml": pods "pod1" already exists
make: *** [Makefile:120: test-e2e] Error 1

@k8s-ci-robot k8s-ci-robot requested review from byako and pohly September 16, 2024 22:21
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 16, 2024
@bart0sh
Copy link
Contributor Author

bart0sh commented Sep 16, 2024

/cc @klueska

@klueska
Copy link
Contributor

klueska commented Sep 17, 2024

I'm fine either way. I'll let @kannon92 / @byako decide (since Alexey had a similar comment on the original PR adding the e2e tests).

Copy link
Contributor

@byako byako left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bart0sh, byako

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

@k8s-ci-robot k8s-ci-robot merged commit 303c1d2 into kubernetes-sigs:main Sep 17, 2024
6 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants