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

Configure 'ordering' for rspec-puppet in PDK #511

Closed
ardrigh opened this issue May 21, 2018 · 1 comment
Closed

Configure 'ordering' for rspec-puppet in PDK #511

ardrigh opened this issue May 21, 2018 · 1 comment

Comments

@ardrigh
Copy link
Contributor

ardrigh commented May 21, 2018

I just found after reading through documentation that Puppet and rspec-puppet handle ordering in different ways.

Currently rspec-puppet defaults to "title-hash" and Puppet 5.5 defaults to "manifest".

The difference between

will order resources randomly, but will use the same order across runs

and

will use the order in which the resources were declared in their manifest files

seems significant enough to make more explicit for users writing tests. This is especially true if random ordering requires additional lines of code to avoid breaking.

It will help improve the user experience with people new to writing tests if the test tools and Puppet itself are consistent in behaviour.

https://github.com/rodjek/rspec-puppet#ordering
https://puppet.com/docs/puppet/4.6/configuration.html#ordering
https://puppet.com/docs/puppet/5.5/configuration.html#ordering

I have also logged a ticket rodjek/rspec-puppet#689 related to the default value.

Is it reasonable to have a configuration option for this?

@scotje scotje added needs-triage Newly created issue that has not been reviewed by a PDK contributor feature and removed needs-triage Newly created issue that has not been reviewed by a PDK contributor labels May 15, 2019
@scotje
Copy link
Contributor

scotje commented May 16, 2019

Thanks for bringing this up! This will addressed via the rspec-puppet issue you filed, at which point PDK will pick up the new behavior.

@scotje scotje closed this as completed May 16, 2019
@scotje scotje removed the feature label May 16, 2019
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

No branches or pull requests

2 participants