blob: c976c878f76298bc4c1bf0dfa802313e7b9deb2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
test_name "test that we can query and find a user that exists."
name = "pl#{rand(999999).to_i}"
step "ensure that our test user exists"
on(agents, puppet_resource('user', name, 'ensure=present'))
step "query for the resource and verify it was found"
on(agents, puppet_resource('user', name)) do
fail_test "didn't find the user #{name}" unless stdout.include? 'present'
end
step "clean up the user and group we added"
on(agents, puppet_resource('user', name, 'ensure=absent'))
on(agents, puppet_resource('group', name, 'ensure=absent'))
|