Skip to content

Commit 4af569a

Browse files
committed
docs: merge latest changes from template-formula
* Completes #179 * Fix testing on `develop` images and enable in the matrix
1 parent 32667d9 commit 4af569a

File tree

8 files changed

+90
-23
lines changed

8 files changed

+90
-23
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,6 @@ Gemfile.lock
108108

109109
# copied `.md` files used for conversion to `.rst` using `m2r`
110110
docs/*.md
111+
112+
# Vim
113+
*.sw?

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ services:
2626
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
2727
env:
2828
matrix:
29-
# Disable tests on Salt develop for now
30-
# See: https://travis-ci.com/saltstack-formulas/php-formula/jobs/211316835
31-
# - INSTANCE: default-debian-9-develop-py3
29+
- INSTANCE: default-debian-9-develop-py3
3230
# - INSTANCE: default-ubuntu-1804-develop-py3
3331
# - INSTANCE: default-centos-7-develop-py3
3432
# - INSTANCE: default-fedora-29-develop-py3

CHANGELOG.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/README.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,21 @@ Testing
725725

726726
Linux testing is done with ``kitchen-salt``.
727727

728+
Requirements
729+
^^^^^^^^^^^^
730+
731+
* Ruby
732+
* Docker
733+
734+
.. code-block:: bash
735+
736+
$ gem install bundler
737+
$ bundle install
738+
$ bin/kitchen test [platform]
739+
740+
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
741+
e.g. ``debian-9-2019-2-py3``.
742+
728743
``bin/kitchen converge``
729744
^^^^^^^^^^^^^^^^^^^^^^^^
730745

kitchen.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,46 @@ platforms:
1818
provision_command:
1919
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
2020
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
21+
provisioner:
22+
pillars_from_files:
23+
php.sls: test/salt/pillar/debian.sls
2124
- name: ubuntu-1804-develop-py3
2225
driver:
2326
image: netmanagers/salt-develop-py3:ubuntu-18.04
2427
provision_command:
2528
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
2629
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
30+
provisioner:
31+
pillars_from_files:
32+
php.sls: test/salt/pillar/debian.sls
2733
- name: centos-7-develop-py3
2834
driver:
2935
image: netmanagers/salt-develop-py3:centos-7
3036
provision_command:
3137
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
3238
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
39+
provisioner:
40+
pillars_from_files:
41+
php.sls: test/salt/pillar/redhat.sls
3342
- name: fedora-29-develop-py3
3443
driver:
3544
image: netmanagers/salt-develop-py3:fedora-29
3645
provision_command:
3746
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
3847
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
48+
provisioner:
49+
pillars_from_files:
50+
php.sls: test/salt/pillar/redhat.sls
3951
- name: opensuse-leap-15-develop-py3
4052
driver:
4153
image: netmanagers/salt-develop-py3:opensuse-leap-15
4254
provision_command:
4355
- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
4456
- sh bootstrap-salt.sh -XdPbfrq -x python3 git develop
4557
run_command: /usr/lib/systemd/systemd
58+
provisioner:
59+
pillars_from_files:
60+
php.sls: test/salt/pillar/suse.sls
4661

4762
## SALT 2019.2
4863
- name: debian-9-2019-2-py3

test/integration/default/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Default InSpec Profile
2+
3+
This shows the implementation of the Default InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
4+
5+
## Verify a profile
6+
7+
InSpec ships with built-in features to verify a profile structure.
8+
9+
```bash
10+
$ inspec check default
11+
Summary
12+
-------
13+
Location: default
14+
Profile: profile
15+
Controls: 4
16+
Timestamp: 2019-06-24T23:09:01+00:00
17+
Valid: true
18+
19+
Errors
20+
------
21+
22+
Warnings
23+
--------
24+
```
25+
26+
## Execute a profile
27+
28+
To run all **supported** controls on a local machine use `inspec exec /path/to/profile`.
29+
30+
```bash
31+
$ inspec exec default
32+
..
33+
34+
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
35+
8 examples, 0 failures
36+
```
37+
38+
## Execute a specific control from a profile
39+
40+
To run one control from the profile use `inspec exec /path/to/profile --controls name`.
41+
42+
```bash
43+
$ inspec exec default --controls package
44+
.
45+
46+
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
47+
1 examples, 0 failures
48+
```
49+
50+
See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb).

test/integration/default/inspec.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ maintainer: Nicolas Rodriguez
44
license: Apache-2.0
55
summary: Verify that the php formula is setup and configured correctly
66
supports:
7-
- os-name: debian
8-
- os-name: ubuntu
9-
- os-name: centos
10-
- os-name: fedora
11-
- os-name: opensuse
12-
- os-name: suse
7+
- platform-name: debian
8+
- platform-name: ubuntu
9+
- platform-name: centos
10+
- platform-name: fedora
11+
- platform-name: opensuse
12+
- platform-name: suse

0 commit comments

Comments
 (0)