-
Notifications
You must be signed in to change notification settings - Fork 105
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
(PDK-636) Make fixture cleaning optional #515
Conversation
Looks like there are some spec tests that are expecting the message about fixture cleanup. |
@@ -89,7 +89,7 @@ def self.invoke(report, options = {}) | |||
|
|||
result[:exit_code] | |||
ensure | |||
tear_down | |||
tear_down if options[:'clean-fixtures'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users forgetting tear-down and then running pdk build
would end up bundling their fixtures. Until pdk release prep
can clean the fixtures, I would suggest having pdk build
run a spec_clean
or tear_down
or whatever to avoid bundling fixtures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunner good call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rodjek has this been ticketed so we don't forget to update pdk build? I'm wondering if we should add the fixtures directory to the .pdkignore vs calling something that will change a tagged repo/directory before building.
CI will be blocked on meta-gems release I think? |
Yep |
Please get this Released soon! I have 19 unit tests for my module, which take 10 seconds to execute. But the entire execution takes about 4 minutes, because of prep time downloading the 6 dependent modules. I really want to write more unit tests, but this process is not giving me "fast feedback". |
To make the iterative workflow faster, this (along with puppetlabs/puppetlabs_spec_helper#242) changes the behaviour of
pdk test unit
so that it doesn't automatically remove the downloaded fixtures after the test run. For CI purposes (or if you really want to slow things down)--clean-fixtures
can be passed topdk test unit
to restore the old behaviour.