From 6de38b147052ba103877ec5be1eeb9a12d6f5dfa Mon Sep 17 00:00:00 2001 From: Molly Waggett Date: Fri, 13 Aug 2021 14:00:41 -0700 Subject: [PATCH] (maint) Use production Puppetfile in `purge` acceptance test 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. --- .../basic_workflow/single_env_purge_unmanaged_modules.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb b/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb index 8b670493e..a1412dab2 100755 --- a/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +++ b/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb @@ -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) @@ -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|