Skip to content

Commit cf9abf5

Browse files
authored
Merge pull request #195 from baby-gnu/ci/force-hostname
test(inspec): use static hostname in mapdata
2 parents b49824b + 15241d3 commit cf9abf5

19 files changed

+25
-59
lines changed

kitchen.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ verifier:
149149

150150
suites:
151151
- name: default
152+
driver:
153+
hostname: example.net
152154
provisioner:
153155
state_top:
154156
base:

test/integration/default/controls/_mapdata_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
# frozen_string_literal: true
22

3-
# Replace per minion strings
4-
replacement = {
5-
hostname: system.hostname
6-
}
7-
83
mapdata_file = "_mapdata/#{system.platform[:finger].split('.').first}.yaml"
9-
mapdata_dump = inspec.profile.file(mapdata_file) % replacement
4+
mapdata_dump = inspec.profile.file(mapdata_file)
105

116
control '`map.jinja` YAML dump' do
127
title 'should contain the lines'

test/integration/default/files/_mapdata/amazonlinux-1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-clients
4848
client_version: latest

test/integration/default/files/_mapdata/amazonlinux-2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-clients
4848
client_version: latest

test/integration/default/files/_mapdata/arch-base-latest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh
4848
client_version: latest

test/integration/default/files/_mapdata/centos-6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-clients
4848
client_version: latest

test/integration/default/files/_mapdata/centos-7.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-clients
4848
client_version: latest

test/integration/default/files/_mapdata/centos-8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-clients
4848
client_version: latest

test/integration/default/files/_mapdata/debian-10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-client
4848
client_version: latest

test/integration/default/files/_mapdata/debian-9.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ openssh:
4242
present: false
4343
banner: /etc/ssh/banner
4444
banner_src: banner
45-
banner_string: 'Welcome to %{hostname}!
45+
banner_string: 'Welcome to example.net!
4646
'
4747
client: openssh-client
4848
client_version: latest

0 commit comments

Comments
 (0)