summaryrefslogtreecommitdiffstats
path: root/acceptance/tests/resource/group/should_query.rb
blob: 3bbce071cea798272e72c2b368a3f9066e466fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
test_name "group should query"

name = "test-group-#{Time.new.to_i}"

step "ensure the group exists on the target systems"
on agents, "getent group #{name} || groupadd #{name}"

step "ensure that the resource agent sees the group"
on(agents, puppet_resource('group', name)) do
    fail_test "missing group identifier" unless stdout.include? "group { '#{name}':"
    fail_test "missing present attributed" unless stdout.include? "ensure => 'present'"
end

step "clean up the system after the test"
on(agents, puppet_resource('group', name, 'ensure=absent'))