Skip to content

Commit 8e9f9cb

Browse files
committed
(PUP-11929) Added command to enable SSH for user if SSH is disabled
1 parent 5baa68a commit 8e9f9cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

acceptance/tests/resource/group/should_query_all.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
test_name "should query all groups"
2-
skip_test if agents.any? {|agent| agent['platform'] =~ /osx-12-arm64/ || agent['platform'] =~ /osx-13-arm64/ } # See PA-4555
32

43
tag 'audit:high',
54
'audit:refactor', # Use block style `test_name`
@@ -9,6 +8,15 @@
98
skip_test('this test fails on windows French due to Cygwin/UTF Issues - PUP-8319,IMAGES-492') if agent['platform'] =~ /windows/ && agent['locale'] == 'fr'
109
step "query natively"
1110

11+
# [PA-4555] Added below code to enable SSH permissions before test starts if they are disabled by default
12+
on(agent, 'dscl . list /Groups | grep com.apple.access_ssh') do
13+
stdout.each_line do |line|
14+
if line =~ /com.apple.access_ssh-disabled/
15+
on(agent, 'dscl . change /Groups/com.apple.access_ssh-disabled RecordName com.apple.access_ssh-disabled com.apple.access_ssh')
16+
end
17+
end
18+
end
19+
1220
groups = agent.group_list
1321

1422
fail_test("No groups found") unless groups

0 commit comments

Comments
 (0)