Skip to content

Commit f2bec1a

Browse files
committed
Replace assert_no_match
The assert_no_match method in Beaker was long deprecated then eventually removed altogether in voxpupuli/beaker@6282311 This commit updates assert_no_match to refute_match.
1 parent c4d6e53 commit f2bec1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

acceptance/lib/puppet/acceptance/service_utils.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def ensure_service_change_on_host(host, service, status)
5757
def ensure_service_idempotent_on_host(host, service, status)
5858
# ensure idempotency
5959
apply_manifest_on(host, service_manifest(service, status)) do |result|
60-
assert_no_match(/Service\[#{service}\]\/ensure/, result.stdout, 'Service status not idempotent') if status[:ensure]
61-
assert_no_match(/Service\[#{service}\]\/enable/, result.stdout, 'Service enable not idempotent') if status[:enable]
60+
refute_match(/Service\[#{service}\]\/ensure/, result.stdout, 'Service status not idempotent') if status[:ensure]
61+
refute_match(/Service\[#{service}\]\/enable/, result.stdout, 'Service enable not idempotent') if status[:enable]
6262
end
6363
end
6464

@@ -121,7 +121,7 @@ def run_nonexistent_service_tests(service)
121121
{ enable: false, ensure: :stopped }.each do |property, value|
122122
assert_match(/#{property}.*#{value}.*$/, result.stdout, "Puppet does not report #{property}=#{value} for a non-existent service")
123123
end
124-
assert_no_match(/logonaccount\s+=>/, result.stdout, "Puppet reports logonaccount for a non-existent service")
124+
refute_match(/logonaccount\s+=>/, result.stdout, "Puppet reports logonaccount for a non-existent service")
125125
end
126126
end
127127

0 commit comments

Comments
 (0)