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

Feature Request: Bundle testscases and resources by feature #30

Open
viccuad opened this issue Jul 8, 2022 · 0 comments
Open

Feature Request: Bundle testscases and resources by feature #30

viccuad opened this issue Jul 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@viccuad
Copy link
Member

viccuad commented Jul 8, 2022

Is your feature request related to a problem?

Right now, the secure supply chain tests have:

Solution you'd like

I would like to have a folder similar to:

tests
└── supply-chain
    ├── e2e.bats
    └── resources
        ├── config1.yml
        ├── config2.yml
        └── policy.yml

So:

  • it's easier to ascertain what relates to what. It also helps for finding examples of policies and configs when one is debugging or implementing new features.
  • Changing a resource for a test doesn't break other unrelated tests.
  • Cleanup of unneeded resources is easier.

This would mean that instead of hard-coding which tests are run here, the runner/makefile should just recursively check the tests folder for .bats files and execute them.

Bonus points if the little recursive script skips folders whose name end in .skip (which allows to disable portions of the test as needed when developing), supports several levels of directories (so one can have tests under supply-chain/policies-install, supply-chain/policy, supply-chain/policy/sbom, supply-chain/policy/images) and works fine no matter where in the tree it is called.

If the entry points for tests is not an executable ending in .bats but just an executable, one could use different testing tools in different folders as needed (maybe bats is nice to test one feature, but venom for another).

Alternatives you've considered

No response

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants