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(e2e): support stopping on failure #482

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

diafour
Copy link
Member

@diafour diafour commented Oct 29, 2024

Description

  • STOP_ON_FAILURE=yes env to stop test on first failure
  • Taskfile changes:
    • Rename run to run:ci, run_local to run.
    • Remove dedicated task run_one.
    • Get Ginkgo version from go.mod, remove hardcoded envs from workflow and Taskfile.
    • Change "ginkgo" task from install to check behaviour: warn about ginkgo absence and version mismatch.
  • Restructure e2e documentation:
    • Restructure.
    • Add documentation for FOCUS and STOP_ON_FAILURE env.
    • Add cluster connection settings priority.

Why do we need it, and what problem does it solve?

  • Run tests without cleanup for debugging purposes.
  • More consistent configuration.

What is the expected result?

  • I can see resources in cluster in erroneous state if error occurs in test.

FOCUS env effect:

$ task run
ginkgo -v --skip-file vm_test.go --skip-file vm_label_annotation_test.go --skip-file ipam_test.go --skip-file disks_test.go

$ FOCUS="Complex test" task run
ginkgo -v --focus Complex test

$ task run:ci                  
ginkgo --skip-file vm_test.go --skip-file vm_label_annotation_test.go --skip-file ipam_test.go --skip-file disks_test.go -v

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

- FOCUS env to run one test
- Remove dedicated task run_one
- STOP_ON_FAILURE=yes env to stop test on first failure
- Add KUBECONFIG env into documentation

Signed-off-by: Ivan Mikheykin <[email protected]>
Signed-off-by: Ivan Mikheykin <[email protected]>
@diafour diafour force-pushed the refactor/e2e/new-envs-focus-and-stop-on-failure branch from d463b9b to 367b340 Compare October 30, 2024 09:02
@diafour diafour marked this pull request as ready for review October 30, 2024 12:17
@diafour diafour changed the title refactor(e2e): support stopping on failure, use FOCUS env refactor(e2e): support stopping on failure Oct 31, 2024
tests/e2e/tests_suite_test.go Outdated Show resolved Hide resolved
@diafour diafour merged commit 1002322 into main Nov 1, 2024
12 checks passed
@diafour diafour deleted the refactor/e2e/new-envs-focus-and-stop-on-failure branch November 1, 2024 08:58
danilrwx pushed a commit that referenced this pull request Nov 5, 2024
* refactor(e2e): support stopping on failure, use FOCUS env

- Remove dedicated task run_one
- Rename run to run:ci, run_local to run.
- STOP_ON_FAILURE=yes env to stop test on first failure
- Add KUBECONFIG env into documentation

---------

Signed-off-by: Ivan Mikheykin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants