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

« back to all changes in this revision

Viewing changes to acceptance/tests/resource/user/should_query.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 "test that we can query and find a user that exists."
2
 
 
3
 
name = "test-user-#{Time.new.to_i}"
4
 
 
5
 
step "ensure that our test user exists"
6
 
on(agents, puppet_resource('user', name, 'ensure=present'))
7
 
 
8
 
step "query for the resource and verify it was found"
9
 
on(agents, puppet_resource('user', name)) do
10
 
    fail_test "didn't find the user #{name}" unless stdout.include? 'present'
11
 
end
12
 
 
13
 
step "clean up the user and group we added"
14
 
on(agents, puppet_resource('user', name, 'ensure=absent'))
15
 
on(agents, puppet_resource('group', name, 'ensure=absent'))