Skip to content

Commit 16c6b52

Browse files
authored
Merge pull request #9100 from spandit-perforce/7.x
7.x [ PUP-11929 ] : Added Command to enable SSH on Mac OS 12/13 64 ARM
2 parents 5baa68a + 554f7e5 commit 16c6b52

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

acceptance/tests/resource/group/should_query_all.rb

Lines changed: 11 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,17 @@
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+
if (agent['platform'] =~ /osx-12-arm64/ || agent['platform'] =~ /osx-13-arm64/)
13+
on(agent, 'dscl . list /Groups | grep com.apple.access_ssh') do
14+
stdout.each_line do |line|
15+
if line =~ /com.apple.access_ssh-disabled/
16+
on(agent, 'dscl . change /Groups/com.apple.access_ssh-disabled RecordName com.apple.access_ssh-disabled com.apple.access_ssh')
17+
end
18+
end
19+
end
20+
end
21+
1222
groups = agent.group_list
1323

1424
fail_test("No groups found") unless groups

0 commit comments

Comments
 (0)