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 support for tags to molecule tests #62

Merged
merged 3 commits into from
Apr 19, 2021

Conversation

gravesm
Copy link
Member

@gravesm gravesm commented Apr 15, 2021

SUMMARY

Parts of the molecule test suite can now be run selectively using tags.
All the kubernetes related tests are grouped into a tag called k8s
while the helm tests are grouped into a tag called helm. The k8s tests
are further divided into tags representing the various files in the
tasks folder.

For example, to run only the tests in the waiter.yml file, you can use:

  $ molecule converge -- --tags waiter

Also, some of k8s tests have not been getting run because they weren't
included anywhere in the test suite. Those are all now included in
converge.yml.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

molecule

ADDITIONAL INFORMATION

Parts of the molecule test suite can now be run selectively using tags.
All the kubernetes related tests are grouped into a tag called `k8s`
while the helm tests are grouped into a tag called `helm`. The k8s tests
are further divided into tags representing the various files in the
tasks folder.

For example, to run only the tests in the waiter.yml file, you can use:

  $ molecule converge -- --tags waiter

Also, some of k8s tests have not been getting run because they weren't
included anywhere in the test suite. Those are all now included in
converge.yml.
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #62 (cb0ae12) into main (8182a3a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   23.17%   23.17%           
=======================================
  Files           1        1           
  Lines         151      151           
  Branches       24       24           
=======================================
  Hits           35       35           
  Misses        111      111           
  Partials        5        5           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8182a3a...cb0ae12. Read the comment docs.

gravesm added 2 commits April 15, 2021 15:13
One of the files that was not being run was info.yml. When this got
added it started clobbering one of the vars in scale.yml, causing that
to fail.
@gravesm gravesm requested review from Akasurde and abikouo April 15, 2021 20:28
@abikouo
Copy link
Contributor

abikouo commented Apr 16, 2021

@gravesm really nice to have such a feature!!
would be good to fine tuned also helm tests to add tags for each functionality like on k8s

@gravesm
Copy link
Member Author

gravesm commented Apr 16, 2021

I wanted to do helm too, but unfortunately the way those tests are structured make it hard to split them apart this way.

@Akasurde Akasurde merged commit b68bf7c into ansible-collections:main Apr 19, 2021
@gravesm gravesm deleted the molecule-tags branch April 23, 2021 17:35
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.

4 participants