1
test_name "#4059: ralsh can change settings"
3
target = "/tmp/hosts-#4059"
4
content = "host example.com ensure=present ip=127.0.0.1 target=#{target}"
6
step "cleanup the target file"
7
on agents, "rm -f #{target}"
9
step "run the resource agent"
10
on(agents, puppet_resource(content)) do
11
stdout.index('Host[example.com]/ensure: created') or
12
fail_test("missing notice about host record creation")
15
on(host, "cat #{target}") do
16
assert_match(/^127\.0\.0\.1\s+example\.com/, stdout, "missing host record in #{target} on #{host}")
20
step "cleanup at the end of the test"
21
on agents, "rm -f #{target}"