Skip to content

Commit

Permalink
(maint) Use production Puppetfile in purge acceptance test
Browse files Browse the repository at this point in the history
Previously, we were using the remote version of the Puppetfile to test the
`r10k puppetfile purge` command. This commit updates the test to use the
deployed version of the Puppetfile, which is what a user would actually use.
  • Loading branch information
mwaggett committed Aug 13, 2021
1 parent d888505 commit ac97fc5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

#Init
master_certname = on(master, puppet('config', 'print', 'certname')).stdout.rstrip
moduledir = on(master, puppet('config', 'print', 'environmentpath')).stdout.strip + '/production/modules'
environments_path = on(master, puppet('config', 'print', 'environmentpath')).stdout.strip
moduledir = File.join(environments_path, 'production', 'modules')
puppetfile_path = File.join(environments_path, 'production', 'Puppetfile')
git_remote_environments_path = '/root/environments'
last_commit = git_last_commit(master, git_remote_environments_path)
r10k_fqp = get_r10k_fqp(master)
Expand Down Expand Up @@ -76,7 +78,7 @@ class { 'motd':
end

step 'Use r10k to Purge Unmanaged Modules'
on(master, "#{r10k_fqp} puppetfile purge --puppetfile #{remote_puppetfile_path} --moduledir #{moduledir} --verbose debug --trace")
on(master, "#{r10k_fqp} puppetfile purge --puppetfile #{puppetfile_path} --moduledir #{moduledir} --verbose debug --trace")

#Agent will fail because r10k will purge the "motd" module
agents.each do |agent|
Expand Down

0 comments on commit ac97fc5

Please sign in to comment.