Skip to content
Snippets Groups Projects
Unverified Commit 429c56e9 authored by Imran Iqbal's avatar Imran Iqbal
Browse files

ci(kitchen+travis+inspec): merge test suites into single `default` suite

parent 7c86d801
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@ AllCops:
- test/integration/**/serverspec/*
# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
Lint/EmptyWhen:
Exclude:
- test/integration/default/controls/config_spec.rb
Style/FormatStringToken:
Exclude:
- test/integration/tomcat_install/controls/yaml_dump_spec.rb
- test/integration/default/controls/yaml_dump_spec.rb
......@@ -58,43 +58,42 @@ jobs:
## Define the rest of the matrix based on Kitchen testing
# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
- env: INSTANCE=tomcat-install-debian-10-master-py3
- env: INSTANCE=tomcat-install-ubuntu-1804-master-py3
# - env: INSTANCE=tomcat-extend-ubuntu-1804-master-py3
# - env: INSTANCE=tomcat-install-centos-8-master-py3
- env: INSTANCE=tomcat-install-fedora-31-master-py3
- env: INSTANCE=tomcat-install-opensuse-leap-151-master-py3
# - env: INSTANCE=tomcat-install-amazonlinux-2-master-py3
# - env: INSTANCE=tomcat-install-arch-base-latest-master-py2
# - env: INSTANCE=tomcat-install-debian-10-3000-1-py3
# - env: INSTANCE=tomcat-install-ubuntu-1804-3000-1-py3
# - env: INSTANCE=tomcat-install-centos-8-3000-1-py3
# - env: INSTANCE=tomcat-install-fedora-31-3000-1-py3
# - env: INSTANCE=tomcat-install-opensuse-leap-151-3000-1-py3
- env: INSTANCE=tomcat-install-amazonlinux-2-3000-1-py3
# - env: INSTANCE=tomcat-install-arch-base-latest-3000-1-py2
# - env: INSTANCE=tomcat-install-debian-10-2019-2-py3
- env: INSTANCE=tomcat-install-debian-9-2019-2-py3
# - env: INSTANCE=tomcat-install-ubuntu-1804-2019-2-py3
# - env: INSTANCE=tomcat-install-ubuntu-1604-2019-2-py3
# - env: INSTANCE=tomcat-install-centos-8-2019-2-py3
- env: INSTANCE=tomcat-install-centos-7-2019-2-py3
# - env: INSTANCE=tomcat-install-fedora-31-2019-2-py3
# - env: INSTANCE=tomcat-install-opensuse-leap-151-2019-2-py3
# - env: INSTANCE=tomcat-install-amazonlinux-2-2019-2-py3
# - env: INSTANCE=tomcat-install-ubuntu-1804-2019-2-py2
# - env: INSTANCE=tomcat-install-amazonlinux-1-2019-2-py2
# - env: INSTANCE=tomcat-install-arch-base-latest-2019-2-py2
# - env: INSTANCE=tomcat-install-centos-7-2018-3-py3
# - env: INSTANCE=tomcat-install-fedora-30-2018-3-py3
# - env: INSTANCE=tomcat-install-debian-9-2018-3-py2
# - env: INSTANCE=tomcat-install-debian-8-2018-3-py2
# - env: INSTANCE=tomcat-install-ubuntu-1804-2018-3-py2
# - env: INSTANCE=tomcat-install-ubuntu-1604-2018-3-py2
# - env: INSTANCE=tomcat-install-centos-6-2018-3-py2
# - env: INSTANCE=tomcat-install-opensuse-leap-151-2018-3-py2
# - env: INSTANCE=tomcat-install-amazonlinux-1-2018-3-py2
# - env: INSTANCE=tomcat-install-arch-base-latest-2018-3-py2
- env: INSTANCE=default-debian-10-master-py3
- env: INSTANCE=default-ubuntu-1804-master-py3
# - env: INSTANCE=default-centos-8-master-py3
- env: INSTANCE=default-fedora-31-master-py3
- env: INSTANCE=default-opensuse-leap-151-master-py3
# - env: INSTANCE=default-amazonlinux-2-master-py3
# - env: INSTANCE=default-arch-base-latest-master-py2
# - env: INSTANCE=default-debian-10-3000-1-py3
# - env: INSTANCE=default-ubuntu-1804-3000-1-py3
# - env: INSTANCE=default-centos-8-3000-1-py3
# - env: INSTANCE=default-fedora-31-3000-1-py3
# - env: INSTANCE=default-opensuse-leap-151-3000-1-py3
- env: INSTANCE=default-amazonlinux-2-3000-1-py3
# - env: INSTANCE=default-arch-base-latest-3000-1-py2
# - env: INSTANCE=default-debian-10-2019-2-py3
- env: INSTANCE=default-debian-9-2019-2-py3
# - env: INSTANCE=default-ubuntu-1804-2019-2-py3
# - env: INSTANCE=default-ubuntu-1604-2019-2-py3
# - env: INSTANCE=default-centos-8-2019-2-py3
- env: INSTANCE=default-centos-7-2019-2-py3
# - env: INSTANCE=default-fedora-31-2019-2-py3
# - env: INSTANCE=default-opensuse-leap-151-2019-2-py3
# - env: INSTANCE=default-amazonlinux-2-2019-2-py3
# - env: INSTANCE=default-ubuntu-1804-2019-2-py2
# - env: INSTANCE=default-amazonlinux-1-2019-2-py2
# - env: INSTANCE=default-arch-base-latest-2019-2-py2
# - env: INSTANCE=default-centos-7-2018-3-py3
# - env: INSTANCE=default-fedora-30-2018-3-py3
# - env: INSTANCE=default-debian-9-2018-3-py2
- env: INSTANCE=default-debian-8-2018-3-py2
# - env: INSTANCE=default-ubuntu-1804-2018-3-py2
# - env: INSTANCE=default-ubuntu-1604-2018-3-py2
# - env: INSTANCE=default-centos-6-2018-3-py2
# - env: INSTANCE=default-opensuse-leap-151-2018-3-py2
# - env: INSTANCE=default-amazonlinux-1-2018-3-py2
# - env: INSTANCE=default-arch-base-latest-2018-3-py2
## Define the release stage that runs `semantic-release`
- stage: 'release'
......
......@@ -173,28 +173,15 @@ verifier:
- cli
suites:
- name: tomcat_install
- name: default
provisioner:
state_top:
base:
'*':
- tomcat.yaml_dump
- tomcat
pillars:
top.sls:
base:
'*':
- tomcat
pillars_from_files:
tomcat.sls: pillar.example
verifier:
inspec_tests:
- path: test/integration/tomcat_install
- name: tomcat_extend
provisioner:
state_top:
base:
'*':
- tomcat.native
- tomcat.config
- tomcat.manager
- tomcat.vhosts
- tomcat.expires
......@@ -207,6 +194,9 @@ suites:
- tomcat
pillars_from_files:
tomcat.sls: pillar.example
dependencies:
- name: comparison_files
path: ./test/salt
verifier:
inspec_tests:
- path: test/integration/tomcat_extend
- path: test/integration/default
# InSpec Profile: `tomcat_extend`
# InSpec Profile: `default`
This shows the implementation of the `tomcat_extend` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
This shows the implementation of the `default` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
## Verify a profile
InSpec ships with built-in features to verify a profile structure.
```bash
$ inspec check tomcat_extend
$ inspec check default
Summary
-------
Location: tomcat_extend
Location: default
Profile: profile
Controls: 4
Timestamp: 2019-06-24T23:09:01+00:00
......@@ -28,7 +28,7 @@ Warnings
To run all **supported** controls on a local machine use `inspec exec /path/to/profile`.
```bash
$ inspec exec tomcat_extend
$ inspec exec default
..
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
......@@ -40,7 +40,7 @@ Finished in 0.0025 seconds (files took 0.12449 seconds to load)
To run one control from the profile use `inspec exec /path/to/profile --controls name`.
```bash
$ inspec exec tomcat_extend --controls package
$ inspec exec default --controls package
.
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
......
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: tomcat_install
name: default
title: tomcat formula
maintainer: SaltStack Formulas
license: Apache-2.0
......
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: tomcat_extend
title: tomcat formula
maintainer: SaltStack Formulas
license: Apache-2.0
summary: Verify that the extended tomcat configuration takes place correctly
supports:
- platform-name: debian
- platform-name: ubuntu
- platform-name: centos
- platform-name: fedora
- platform-name: opensuse
- platform-name: suse
- platform-name: freebsd
- platform-name: amazon
- platform-name: arch
# InSpec Profile: `tomcat_install`
This shows the implementation of the `tomcat_install` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
## Verify a profile
InSpec ships with built-in features to verify a profile structure.
```bash
$ inspec check tomcat_install
Summary
-------
Location: tomcat_install
Profile: profile
Controls: 4
Timestamp: 2019-06-24T23:09:01+00:00
Valid: true
Errors
------
Warnings
--------
```
## Execute a profile
To run all **supported** controls on a local machine use `inspec exec /path/to/profile`.
```bash
$ inspec exec tomcat_install
..
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
8 examples, 0 failures
```
## Execute a specific control from a profile
To run one control from the profile use `inspec exec /path/to/profile --controls name`.
```bash
$ inspec exec tomcat_install --controls package
.
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
1 examples, 0 failures
```
See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment