test(map): verify map.jinja dump using _mapdata state

* Semi-automated using https://github.com/myii/ssf-formula/pull/245
This commit is contained in:
Imran Iqbal
2020-08-25 16:06:48 +01:00
parent cd2950289e
commit 63865a286e
22 changed files with 276 additions and 0 deletions
@@ -0,0 +1,13 @@
# frozen_string_literal: true
control '`map.jinja` YAML dump' do
title 'should contain the lines'
mapdata_file = "_mapdata/#{system.platform[:finger].split('.').first}.yaml"
mapdata_dump = inspec.profile.file(mapdata_file)
describe file('/tmp/salt_mapdata_dump.yaml') do
it { should exist }
its('content') { should include mapdata_dump }
end
end
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Amazon Linux AMI-2018
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Amazon Linux-2
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Arch
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# CentOS-6
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# CentOS Linux-7
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# CentOS Linux-8
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Debian-10
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Debian-9
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Fedora-31
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Fedora-32
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Leap-15
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Ubuntu-16.04
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Ubuntu-18.04
---
sudoers:
pkg: sudo
@@ -0,0 +1,5 @@
# yamllint disable rule:indentation rule:line-length
# Ubuntu-20.04
---
sudoers:
pkg: sudo
+3
View File
@@ -6,6 +6,9 @@ title: sudoers formula
maintainer: SaltStack Formulas
license: Apache-2.0
summary: Verify that the sudoers formula is setup and configured correctly
depends:
- name: share
path: test/integration/share
supports:
- platform-name: debian
- platform-name: ubuntu