Skip to content

testing: improve testing of examples #15002

@Joibel

Description

@Joibel

Summary

We have a number of examples which are not tested, and would provide more test coverage if we tested them.
It would be good if we also knew we had not regressed and that all examples worked.

Use Cases

The code to run examples is in test/e2e/examples_test.go

Multiple suggested improvements to the test framework for examples. These can be tackled in separate PRs.

  • Get the tests to run in parallel. Currently they run under testify/suite, which breaks t.Parallel. So divorce it from suite as the setup for this is trivial, and then run each test in a subtest with t.Parallel()
  • Currently we filter the tests based on seeing workflows.argoproj.io/test in the example. In the interests of more and better coverage I suggest flipping this to workflows.argoproj.io/no-test, probably with two options:
    • workflows.argoproj.io/no-test-broken for genuinely broken examples which can be fixed
    • workflows.argoproj.io/no-test-environment for examples which need to run in a different environment, e.g. need access to artifactory.
  • Run argo lint on every example. Failing examples could be flagged with workflows.argoproj.io/no-lint, but really we should fix these!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions