Skip to content

Commit

Permalink
(PUP-11929) Running the SSH enable command only for MacOS 12/13
Browse files Browse the repository at this point in the history
  • Loading branch information
span786 committed Aug 11, 2023
1 parent 902a389 commit e72f027
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions acceptance/tests/resource/group/should_query_all.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
step "query natively"

# [PA-4555] Added below code to enable SSH permissions before test starts if they are disabled by default
on(agent, 'dscl . list /Groups | grep com.apple.access_ssh') do
stdout.each_line do |line|
if line =~ /com.apple.access_ssh-disabled/
on(agent, 'dscl . change /Groups/com.apple.access_ssh-disabled RecordName com.apple.access_ssh-disabled com.apple.access_ssh')
if (agent['platform'] =~ /osx-12-arm64/ || agent['platform'] =~ /osx-13-arm64/)
on(agent, 'dscl . list /Groups | grep com.apple.access_ssh') do
stdout.each_line do |line|
if line =~ /com.apple.access_ssh-disabled/
on(agent, 'dscl . change /Groups/com.apple.access_ssh-disabled RecordName com.apple.access_ssh-disabled com.apple.access_ssh')
end
end
end
end
Expand Down

0 comments on commit e72f027

Please sign in to comment.