Skip to content

Commit 824968b

Browse files
authored
Merge pull request #8995 from joshcooper/no_customtype_7x
(maint) Handle case where agent and server are on the same host
2 parents e91e775 + 3956f16 commit 824968b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

acceptance/tests/agent/agent_fails_with_unknown_resource.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def refresh
6868
agent.rm_rf(vendor_modules_path)
6969
end
7070

71-
on(agent, puppet('agent', '-t', '--environment', tmp_environment), acceptable_exit_codes: [1]) do |result|
71+
# override vendormoduledir in case agent and server are on the same host
72+
agent_dir = get_test_file_path(agent, 'vendormodulepath')
73+
on(agent, puppet('agent', '-t', '--environment', tmp_environment, '--vendormoduledir', agent_dir), acceptable_exit_codes: [1]) do |result|
7274
assert_match(/Error: Failed to apply catalog: Resource type 'Mycustomtype' was not found/, result.stderr)
7375
end
7476
end

0 commit comments

Comments
 (0)