-
Notifications
You must be signed in to change notification settings - Fork 104
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-373) Make test unit --list consistent with test unit #216
Conversation
`pdk test unit` was using a pattern defined in puppetlabs_spec_helper while `pdk test unit --list` was using no pattern. This commit updates the --list option to use a puppetlabs_spec_helper rake task so it uses the same pattern.
lib/pdk/tests/unit.rb
Outdated
next | ||
end | ||
if options.key?(:parallel) | ||
json_result.push(PDK::Util.find_valid_json_in(result[:stdout])) |
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.
This will only get the first JSON result, but in parallel there will be many. I'll push a fix and an acceptance test.
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.
Apologies @austb I didn't realise that this was the point at which parallel results were actually gathered together
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.
No problem @james-stocks, just pushed a new acceptance test. And it made me realize that it can only parallelize when there are multiple spec files. So I learned something about what I did 👍
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.
Testing this did remind me that we need to figure out the upgrade story soon so that certain versions of the pdk can require template and/or metagem upgrades to support new functionality.
(maint) Update PDK::Test::Unit.parallel_with_no_tests? for PSH #216 changes
pdk test unit
was using a pattern defined in puppetlabs_spec_helper whilepdk test unit --list
was using no pattern.This commit updates the --list option to use a puppetlabs_spec_helper rake task so it uses the same pattern.