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

add tests for modules being included in the action group #252

Open
briantist opened this issue Apr 26, 2022 · 1 comment
Open

add tests for modules being included in the action group #252

briantist opened this issue Apr 26, 2022 · 1 comment
Assignees
Labels
tests Adds or modifies tests

Comments

@briantist
Copy link
Collaborator

briantist commented Apr 26, 2022

SUMMARY

I was thinking about how to prevent #251 in the future, and maybe trying to add tests for modules to ensure that they are in the action group. They would have to run only on core-2.12 and higher, was thinking I could set defaults for the group, then run the module in a way it should pass.

The catch is, that this would have to be added to new module's tests to be effective, so if you remember to add the test, you'll remember to add it to the action group (mission accomplished?) but if you forget to add the test, you'll also forget to add it to the action group, and the test will not catch it (mission failed).

I might have to look at this another way, maybe something a bit more meta, like a general test that reads lists all the modules in the collection, parses meta/runtime.yml, and throws an error if any modules are not included. There'd be an exclude file somewhere so that modules that shouldn't be in the group can be excluded, that way the test will fail unless you either add the module to the action group, or add it to the exclusion list.

This kind of only works for as long as there is a single action group where most modules are expected to go. That will probably remain the case, but some revisiting will be needed if new action groups are created.

I suppose the same idea works: either add the module to any group or mark it as excluded.

ISSUE TYPE
  • Test Idea
ADDITIONAL INFORMATION

Related: #251

@briantist briantist added the tests Adds or modifies tests label Apr 26, 2022
@briantist briantist self-assigned this Apr 26, 2022
@felixfontein
Copy link
Contributor

I might have to look at this another way, maybe something a but more meta, like a general test that reads lists all the modules in the collection, parses meta/runtime.yml, and throws an error if any modules are not included. There'd be an exclude file somewhere so that modules that shouldn't be in the group can be excluded, that way the test will fail unless you either add the module to the action group, or add it to the exclusion list.

👍 I would do it like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Adds or modifies tests
Projects
Development

No branches or pull requests

2 participants