Skip to content

Commit 9a55434

Browse files
committed
Return boolean instead of Beaker::Result
Commit 9f5f8e5 eliminated the global `stdout`, but changed the block to return whatever the `on` method returned (which was a Beaker::Result object). Since the object is truthy, RHEL6 wasn't excluded.
1 parent e24d890 commit 9a55434

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

acceptance/tests/resource/service/init_on_systemd.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
test_name 'SysV on default Systemd Service Provider Validation' do
22

33
confine :to, :platform => /el-[6-8]|centos|fedora-(2[0-9])/ do |h|
4-
on(h, 'which systemctl', :acceptable_exit_codes => [0, 1]) do |result|
5-
result.stdout =~ /systemctl/
6-
end
4+
result = on(h, 'which systemctl', :acceptable_exit_codes => [0, 1])
5+
result.stdout =~ /systemctl/
76
end
87

98
tag 'audit:high',

0 commit comments

Comments
 (0)