Skip to content

Commit bbe1c78

Browse files
committed
test: standardise use of share suite & _mapdata state [skip ci]
* Automated using myii/ssf-formula#302
1 parent 3ff398b commit bbe1c78

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Layout/LineLength:
77
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
88
Max: 88
99
Metrics/BlockLength:
10-
ExcludedMethods:
10+
IgnoredMethods:
1111
- control
1212
- describe
1313
# Increase from default of `25`

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
55
# Use the latest version of `inspec` prior to `4.23.4`, which introduces a
66
# regression where the diff isn't displayed when comparing using `eq`.
77
gem 'inspec', '~> 4.22.22'
8-
# Install the `kitchen-docker` gem from GitHub because the latest version
8+
# Install the `kitchen-docker` gem using `git` because the latest version
99
# currently available (`2.10.0`) doesn't include a recent fix for Gentoo.
1010
# rubocop:disable Layout/LineLength
1111
gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf'

test/integration/default/inspec.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ supports:
1818
- platform-name: opensuse
1919
- platform-name: suse
2020
- platform-name: freebsd
21+
- platform-name: openbsd
2122
- platform-name: amazon
2223
- platform-name: oracle
2324
- platform-name: arch

test/integration/share/inspec.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ supports:
1414
- platform-name: opensuse
1515
- platform-name: suse
1616
- platform-name: freebsd
17+
- platform-name: openbsd
1718
- platform-name: amazon
1819
- platform-name: oracle
1920
- platform-name: arch

test/integration/share/libraries/system.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def build_platform_name
3838
case inspec.platform[:name]
3939
when 'amazon', 'oracle'
4040
"#{inspec.platform[:name]}linux"
41-
when 'windows_8.1_pro', 'windows_server_2019_datacenter'
42-
'windows'
41+
when /^windows_/
42+
inspec.platform[:family]
4343
else
4444
inspec.platform[:name]
4545
end
@@ -63,6 +63,8 @@ def build_platform_release
6363
'8.1'
6464
when 'windows_server_2019_datacenter'
6565
'2019-server'
66+
when 'windows_server_2016_datacenter'
67+
'2016-server'
6668
else
6769
inspec.platform[:release]
6870
end

0 commit comments

Comments
 (0)