diff --git a/CODEOWNERS b/CODEOWNERS index 723b37d..35b12c8 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -17,6 +17,11 @@ /docs/TOFS_pattern.rst @saltstack-formulas/ssf /*/libsaltcli.jinja @saltstack-formulas/ssf /*/libtofs.jinja @saltstack-formulas/ssf +/openvpn/_mapdata/ @saltstack-formulas/ssf +/openvpn/libsaltcli.jinja @saltstack-formulas/ssf +/openvpn/libtofs.jinja @saltstack-formulas/ssf +/test/integration/**/_mapdata_spec.rb @saltstack-formulas/ssf +/test/integration/**/libraries/system.rb @saltstack-formulas/ssf /test/integration/**/inspec.yml @saltstack-formulas/ssf /test/integration/**/README.md @saltstack-formulas/ssf /.gitignore @saltstack-formulas/ssf diff --git a/test/integration/share/README.md b/test/integration/share/README.md index 7de80b2..5bc510c 100644 --- a/test/integration/share/README.md +++ b/test/integration/share/README.md @@ -11,9 +11,11 @@ Its goal is to share the libraries between all profiles. The `system` library provides easy access to system dependent information: - `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective - - `system.platform[:family]` provide a family name for Arch - - `system.platform[:name]` modify `amazon` to `amazonlinux` - - `system.platform[:release]` tweak Arch and Amazon Linux: + - `system.platform[:family]` provide a family name for Arch and Gentoo + - `system.platform[:name]` append `linux` to both `amazon` and `oracle`; ensure Windows platforms are resolved as simply `windows` + - `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo and Windows: - `Arch` is always `base-latest` - `Amazon Linux` release `2018` is resolved as `1` + - `Gentoo` release is trimmed to its major version number and then the init system is appended (i.e. `sysv` or `sysd`) + - `Windows` uses the widely-used release number (e.g. `8.1` or `2019-server`) in place of the actual system release version - `system.platform[:finger]` is the concatenation of the name and the major release number (except for Ubuntu, which gives `ubuntu-20.04` for example) diff --git a/test/integration/share/libraries/system.rb b/test/integration/share/libraries/system.rb index 91ebbc8..ac9c13a 100644 --- a/test/integration/share/libraries/system.rb +++ b/test/integration/share/libraries/system.rb @@ -29,6 +29,8 @@ def build_platform_family case inspec.platform[:name] when 'arch' 'arch' + when 'gentoo' + 'gentoo' else inspec.platform[:family] end @@ -36,12 +38,10 @@ def build_platform_family def build_platform_name case inspec.platform[:name] - when 'amazon' - 'amazonlinux' - when 'windows_8.1_pro' + when 'amazon', 'oracle' + "#{inspec.platform[:name]}linux" + when 'windows_8.1_pro', 'windows_server_2019_datacenter' 'windows' - when 'windows_server_2019_datacenter' - 'windows-server' else inspec.platform[:name] end @@ -60,7 +60,7 @@ def build_platform_release when 'windows_8.1_pro' '8.1' when 'windows_server_2019_datacenter' - '2019' + '2019-server' else inspec.platform[:release] end