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

« back to all changes in this revision

Viewing changes to acceptance/tests/puppet_apply_a_file_should_create_a_file_and_report_the_md5.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 "puppet apply should create a file and report an MD5"
2
 
 
3
 
file = "/tmp/hello.world.#{Time.new.to_i}.txt"
4
 
manifest = "file{'#{file}': content => 'test'}"
5
 
 
6
 
step "clean up #{file} for testing"
7
 
on agents, "rm -f #{file}"
8
 
 
9
 
step "run the manifest and verify MD5 was printed"
10
 
apply_manifest_on(agents, manifest) do
11
 
    fail_test "didn't find the content MD5 on output" unless
12
 
        stdout.include? "defined content as '{md5}098f6bcd4621d373cade4e832627b4f6'"
13
 
end
14
 
 
15
 
step "clean up #{file} after testing"
16
 
on agents, "rm -f #{file}"