summaryrefslogtreecommitdiffstats
path: root/acceptance/tests/resource/file/should_create_empty.rb
blob: e9d9d8e27f89e8556cf49d0f69f9c9373b75a732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
test_name "should create empty file for 'present'"

target = "/tmp/test-#{Time.new.to_i}"

step "clean up the system before we begin"
on agents, "rm -rf #{target}"

step "verify we can create an empty file"
on(agents, puppet_resource("file", target, 'ensure=present'))

step "verify the target was created"
on agents, "test -f #{target} && test ! -s #{target}"

step "clean up after the test run"
on agents, "rm -rf #{target}"