Explanation
the .fixtures.yml file is used to list dependencies that we use in rspec-puppet tests. Some of the files use legacy elements that aren't required anymore. This needs to be cleaned up.
Implementation
A basic and good example:
---
fixtures:
repositories:
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib
A bad example:
fixtures:
repositories:
ssh: "https://github.com/saz/puppet-ssh.git"
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
sshkeys_core:
repo: https://github.com/puppetlabs/puppetlabs-sshkeys_core.git
puppet_version: ">= 6.0.0"
symlinks:
bacula: "#{source_dir}"
Things that should be fixed:
- Ensure the
--- in the first line
- We don't need to list the repo key for a dependency
- Some modules have a
puppet_version constraint for puppet 6 and newer. We only test on openvox 7 and 8, the constraint has to be removed
- The
symlinks key isn't required if it just adds a symlink to the module itself.
- modules aren't sorted alphabetically
Cleaned up example:
---
fixtures:
repositories:
concat: 'https://github.com/puppetlabs/puppetlabs-concat.git'
ssh: 'https://github.com/saz/puppet-ssh.git'
sshkeys_core: 'https://github.com/puppetlabs/puppetlabs-sshkeys_core.git'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
The goal is to implement a script that will rewrite the fixtures.yml (similar to https://github.com/voxpupuli/modulesync_config/blob/master/bin/add_openvox_to_metadata_json) and roll the changes out to all modules
Validation
~/code/modulesync_config/modules/voxpupuli $ grep puppet_version puppet-*/.fixtures.yml | wc -l
25
Further information
This came up during voxpupuli/puppet_fixtures#6
Explanation
the
.fixtures.ymlfile is used to list dependencies that we use inrspec-puppettests. Some of the files use legacy elements that aren't required anymore. This needs to be cleaned up.Implementation
A basic and good example:
A bad example:
Things that should be fixed:
---in the first linepuppet_versionconstraint for puppet 6 and newer. We only test on openvox 7 and 8, the constraint has to be removedsymlinkskey isn't required if it just adds a symlink to the module itself.Cleaned up example:
The goal is to implement a script that will rewrite the fixtures.yml (similar to https://github.com/voxpupuli/modulesync_config/blob/master/bin/add_openvox_to_metadata_json) and roll the changes out to all modules
Validation
Further information
This came up during voxpupuli/puppet_fixtures#6