-
Notifications
You must be signed in to change notification settings - Fork 511
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 validation and test configuration #52
Comments
How about adding some simple spec test examples? I'm stumped as to how to add spec testing to my control-repo as the manifest aren't in 'standard' locations. |
@bschonec generally speaking when spec testing in a control-repo there are two paths to choose from:
Personally, I prefer going the onceover route over the 'roll your own' approach. With that being said I've implemented it both ways before. Going back to your previous comment, I do find value leveraging the pdk in this scenario as well. Any files that you don't want the pdk to add in can always be removed by adding something along the lines of this (picking on appveyor): appveyor.yml:
delete: true to a If using the pdk I also recommend setting the To leverage onceover a Gemfile:
optional:
':development':
- gem: 'onceover'
Rakefile:
requires:
- require: 'onceover/rake_tasks'
conditional: "Gem.loaded_specs.key? 'onceover'"
.fixtures.yml:
unmanaged: true
spec/spec_helper.rb:
delete: true
.gitignore:
paths:
- '.onceover' We do also have a community slack: https://slack.puppet.com/ There's a |
As proposed in puppetlabs/pdk#333 this repository should serve as a default setup for control repositories generated by PDK.
Hence, we should add a
Gemfile
,.gitignore
,.rubocop.yml
(and optionally proposed CI configuration and other files?) that allow running validation and testing in a simple fashion via PDK (see below). Sample files are included in the Puppet Labs pdk-module-template repository.Example Workflow (PDK)
# create control repo $ pdk new control
# run static analysis tools $ pdk validate
The text was updated successfully, but these errors were encountered: