~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to acceptance/tests/resource/host/should_create.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
test_name "host should create"
2
 
 
3
 
target = "/tmp/host-#{Time.new.to_i}"
4
 
 
5
 
step "clean up for the test"
6
 
on agents, "rm -vf #{target}"
7
 
 
8
 
step "create the host record"
9
 
on(agents, puppet_resource("host", "test", "ensure=present",
10
 
              "ip=127.0.0.1", "target=#{target}"))
11
 
 
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/
15
 
end