From e8a12376324a1ae6a62485da6b84ccb3df8ac484 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 17 May 2022 08:51:42 +0100 Subject: [PATCH] test(system.rb): add support for `mac_os_x` [skip ci] * Automated using https://github.com/myii/ssf-formula/pull/442 --- test/integration/share/inspec.yml | 1 + test/integration/share/libraries/system.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test/integration/share/inspec.yml b/test/integration/share/inspec.yml index ee200809b..28a97b94b 100644 --- a/test/integration/share/inspec.yml +++ b/test/integration/share/inspec.yml @@ -21,4 +21,5 @@ supports: - platform-name: gentoo - platform-name: almalinux - platform-name: rocky + - platform-name: mac_os_x - platform: windows diff --git a/test/integration/share/libraries/system.rb b/test/integration/share/libraries/system.rb index 64fe7ea73..0db9d0b17 100644 --- a/test/integration/share/libraries/system.rb +++ b/test/integration/share/libraries/system.rb @@ -57,6 +57,8 @@ def build_platform_release 'base-latest' when 'gentoo' "#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}" + when 'mac_os_x' + inspec.command('sw_vers -productVersion').stdout.to_s when 'opensuse' # rubocop:disable Style/NumericLiterals,Layout/LineLength inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release]