-
-
Notifications
You must be signed in to change notification settings - Fork 2
fix spec_dir in rest_spec indirector #2
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
Conversation
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.
You are right that this is wrong. However, the solution is using :libdir
instead of :vardir
. If you fix this, I'll happily merge the change.
Thank you. Done! |
Hmm actually, I'm just reading the doc and code again. It is intended to be For this reason, I had chosen to distribute it using |
I saw this definition, but I think that serverspec logic in modules is kinda weird. And could you tell me, where are you creating directory /var/lib/puppet/policy/server? You are right, serverspec doesn't need to be distributed with pluginsync, but it's easier way to get serverspecs in right place. I have some hacks for puppet-policy in my vagrant testing environment, but I don't want to use hacks in production. |
I thought about copying serverspecs in rest_spec indirector (like auto_spec do it), but I can't get list of modules (or don't know how to do it) |
Iirc, the one reason why I chose against using |
In fact, the idea of the definition was that you could choose to deploy serverspec associated to a class, so you wouldn't deploy all the tests just because a module is present on the Puppetmaster. |
I have serverspecs which I don't want to generate. If you generate serverspecs from code, you just check how puppet works. But I want to find mistakes in code and if I'll generate its from code, I never find them. So, my auto_specs look like
It looks awful. That's why I decided to distribute serverspecs with pluginsync or just copy with rest_spec. And I'm totally agree with you, distribution with pluginsync is a bad idea, I don't want to have all serverspecs :) |
I don't agree that autospecs only check how Puppet works. They check that it actually worked, which is quite different. Say Puppet deployed the vhost fine, and started Apache fine, but the Apache init script failed and Apache crashed after a few seconds, or didn't actually load the vhost properly. You'll see that with the autospecs, but it's not Puppet's fault. |
OK, I got your point, just don't want to use serverspecs only for monitoring but acceptance tests. I'll think about it and try to find a way to resolve it without using policy::serverspec in code. Thank you! |
Sure. If you have new ideas to improve deployment of tests and how to pick which tests to run, I'll be happy to hear them! |
Pluginsync uses /var/lib/puppet/lib/ directory for syncing plugins in modules, but puppet-policy is looking for specs in /var/lib/puppet/policy/server (I don't have /var/lib/puppet/policy directory by default).
'lib/' was added in spec_dir to fix that problem.