1
test_name "host should create"
3
target = "/tmp/host-#{Time.new.to_i}"
5
step "clean up for the test"
6
on agents, "rm -vf #{target}"
8
step "create the host record"
9
on(agents, puppet_resource("host", "test", "ensure=present",
10
"ip=127.0.0.1", "target=#{target}"))
12
step "verify that the record was created"
13
on(agents, "cat #{target} ; rm -f #{target}") do
14
fail_test "record was not present" unless stdout =~ /^127\.0\.0\.1[[:space:]]+test/