1
0
Fork 0
mirror of synced 2024-12-21 21:51:09 -05:00

test(system.rb): add support for mac_os_x [skip ci]

* Automated using https://github.com/myii/ssf-formula/pull/442
This commit is contained in:
Imran Iqbal 2022-05-17 08:49:42 +01:00
parent 1dc94c23f2
commit e8d4e7eb9e
No known key found for this signature in database
GPG key ID: 6D8629439D2B7819
2 changed files with 3 additions and 0 deletions

View file

@ -21,4 +21,5 @@ supports:
- platform-name: gentoo - platform-name: gentoo
- platform-name: almalinux - platform-name: almalinux
- platform-name: rocky - platform-name: rocky
- platform-name: mac_os_x
- platform: windows - platform: windows

View file

@ -57,6 +57,8 @@ class SystemResource < Inspec.resource(1)
'base-latest' 'base-latest'
when 'gentoo' when 'gentoo'
"#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}" "#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}"
when 'mac_os_x'
inspec.command('sw_vers -productVersion').stdout.to_s
when 'opensuse' when 'opensuse'
# rubocop:disable Style/NumericLiterals,Layout/LineLength # rubocop:disable Style/NumericLiterals,Layout/LineLength
inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release] inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release]