summaryrefslogtreecommitdiffstats
path: root/acceptance/tests/resource/group/should_not_destoy_unexisting.rb
blob: 256a8f1463f23fe2fa3a7b0e0c7f754293fbea62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
test_name "should not destroy a group that doesn't exist"

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

step "verify the group does not already exist"
on(agents, puppet_resource('group', name, 'ensure=absent'))

step "verify that we don't remove the group when it doesn't exist"
on(agents, puppet_resource('group', name, 'ensure=absent')) do
    fail_test "it looks like we tried to remove the group" if
        stdout.include? "notice: /Group[#{name}]/ensure: removed"
end