1
test_name "Should allow symlinks to directories as configuration directories"
3
step "Create the test confdir with a link to it"
4
confdir = "/tmp/puppet_conf-directory-#{$$}"
5
conflink = "/tmp/puppet_conf-symlink-#{$$}"
7
on agents, "rm -rf #{conflink} #{confdir}"
9
on agents, "mkdir #{confdir}"
10
on agents, "ln -s #{confdir} #{conflink}"
12
create_remote_file agents, "#{confdir}/puppet.conf", <<CONFFILE
14
certname = "awesome_certname"
17
manifest = 'notify{"My certname is $clientcert": }'
19
step "Run Puppet and ensure it used the conf file in the confdir"
20
on agents, puppet_apply("--confdir #{conflink}"), :stdin => manifest do
21
assert_match("My certname is awesome_certname", stdout)
24
step "Check that the symlink and confdir are unchanged"
25
on agents, "[ -L #{conflink} ]"
26
on agents, "[ -d #{confdir} ]"
27
on agents, "[ $(readlink #{conflink}) = #{confdir} ]"