From cf811ec90ad81b694a0232afe47102c22f12fbb0 Mon Sep 17 00:00:00 2001
From: Imran Iqbal <iqbalmy@hotmail.com>
Date: Tue, 23 Mar 2021 21:26:07 +0000
Subject: [PATCH] test: standardise use of `share` suite & `_mapdata` state
 [skip ci]

* Automated using https://github.com/myii/ssf-formula/pull/302
---
 .rubocop.yml                               | 2 +-
 Gemfile                                    | 2 +-
 test/integration/default/inspec.yml        | 1 +
 test/integration/share/inspec.yml          | 1 +
 test/integration/share/libraries/system.rb | 6 ++++--
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/.rubocop.yml b/.rubocop.yml
index 9367e99..2cceb73 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -7,7 +7,7 @@ Layout/LineLength:
   # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
   Max: 88
 Metrics/BlockLength:
-  ExcludedMethods:
+  IgnoredMethods:
     - control
     - describe
   # Increase from default of `25`
diff --git a/Gemfile b/Gemfile
index 15a77c3..c08ad6c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
 # Use the latest version of `inspec` prior to `4.23.4`, which introduces a
 # regression where the diff isn't displayed when comparing using `eq`.
 gem 'inspec',      '~> 4.22.22'
-# Install the `kitchen-docker` gem from GitHub because the latest version
+# Install the `kitchen-docker` gem using `git` because the latest version
 # currently available (`2.10.0`) doesn't include a recent fix for Gentoo.
 # rubocop:disable Layout/LineLength
 gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf'
diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml
index 7f2f889..631e418 100644
--- a/test/integration/default/inspec.yml
+++ b/test/integration/default/inspec.yml
@@ -17,6 +17,7 @@ supports:
   - platform-name: opensuse
   - platform-name: suse
   - platform-name: freebsd
+  - platform-name: openbsd
   - platform-name: amazon
   - platform-name: oracle
   - platform-name: arch
diff --git a/test/integration/share/inspec.yml b/test/integration/share/inspec.yml
index 697417a..cf623a1 100644
--- a/test/integration/share/inspec.yml
+++ b/test/integration/share/inspec.yml
@@ -14,6 +14,7 @@ supports:
   - platform-name: opensuse
   - platform-name: suse
   - platform-name: freebsd
+  - platform-name: openbsd
   - platform-name: amazon
   - platform-name: oracle
   - platform-name: arch
diff --git a/test/integration/share/libraries/system.rb b/test/integration/share/libraries/system.rb
index ba08443..461dea4 100644
--- a/test/integration/share/libraries/system.rb
+++ b/test/integration/share/libraries/system.rb
@@ -38,8 +38,8 @@ def build_platform_name
     case inspec.platform[:name]
     when 'amazon', 'oracle'
       "#{inspec.platform[:name]}linux"
-    when 'windows_8.1_pro', 'windows_server_2019_datacenter'
-      'windows'
+    when /^windows_/
+      inspec.platform[:family]
     else
       inspec.platform[:name]
     end
@@ -63,6 +63,8 @@ def build_platform_release
       '8.1'
     when 'windows_server_2019_datacenter'
       '2019-server'
+    when 'windows_server_2016_datacenter'
+      '2016-server'
     else
       inspec.platform[:release]
     end