Imran Iqbal
286856058a
fix(openbsd): fix `dig_pkg`, avoid `UsePAM` & add verification file
3 vuotta sitten
Daniel Dehennin
eafc780866
chore(rubocop): allow use of `YAML.load` for `_mapdata.rb` [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/296
3 vuotta sitten
Imran Iqbal
a0d3e3ed8c
chore: standardise structure (`.gitignore` & `_mapdata.rb`) [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/292
3 vuotta sitten
Imran Iqbal
37597e5b12
refactor(map): use top-level `values:` key in `map.jinja` dumps
* Semi-automated using https://github.com/myii/ssf-formula/pull/284
4 vuotta sitten
Imran Iqbal
2bab68f5ff
test(map): standardise `map.jinja` verification
* Automated using https://github.com/myii/ssf-formula/pull/281
4 vuotta sitten
Daniel Dehennin
8cb31c6967
test(inspec): no more need to mangle mapdata for hostname
We force the hostname in `kitchen` so the `_mapdata` files can be
static.
4 vuotta sitten
Daniel Dehennin
1c99556695
test(inspec): display proper diff when `_mapdata` mismatch
The use of `eq` instead of `include` premits to have a nice diff after
the `expected/got` oneliners.
4 vuotta sitten
Daniel Dehennin
14e843ec2b
fix(inspec): use the name `_mapdata` everywhere for coherency
4 vuotta sitten
Daniel Dehennin
0eafbd945c
test(inspec): verify `map.jinja` dump
We store validated `map.jinja` dump under the profile `files`
directory to access them with `inspec.profile.file('filename')` to
validate the content of the generated mapdata file.
The YAML files contain a value specific to each minion, its hostname,
so we use string format to expand `%{hostname}`.
The `default` inspec profile need to depends on `share` to access the
`system` and `salt_minion` libraries.
4 vuotta sitten
Daniel Dehennin
06ef24b8e1
test(config_spec): verify /etc/ssh/ssh_known_hosts
4 vuotta sitten
Daniel Dehennin
6b7d8df156
fix(inspec): the package name for Arch is openssh
For Arch, Inspec define `platform[:family]` as `linux` and
`platform[:name]` as `arch`.
4 vuotta sitten
Daniel Dehennin
2cfb5a74f3
fix(inspec): make rubocop happy
* test/integration/default/controls/services_spec.rb: favor modifier
if usage when having a single-line body.
* test/integration/default/controls/config_spec.rb: add frozen string
literal comment.
* test/integration/default/controls/packages_spec.rb: ditoo.
* test/integration/default/controls/services_spec.rb: ditoo.
4 vuotta sitten
Imran Iqbal
fe1af098b3
test(packages_spec): prevent control for `bsd` family
* Refactor `package_name` using `case` like other formulas
4 vuotta sitten
Imran Iqbal
047b753a9e
test(inspec): fix `config_spec` tests on *BSD (`wheel` not `root`)
5 vuotta sitten
Imran Iqbal
267042c838
test(inspec): add tests based on existing Serverspec tests ( #168 )
* ci(kitchen): use `openssh.config` as `state_top`
* Semi-automated using https://github.com/myii/ssf-formula/pull/33
* test(pillar): remove deprecated option and disabled method
* https://travis-ci.org/myii/openssh-formula/jobs/585340845#L1811-L1813 :
* test(pillar): use same SSH options as used by Travis
* Using existing options locks out after `kitchen converge` (before `verify`)
* https://travis-ci.org/myii/openssh-formula/jobs/585356835#L2957-L2965 :
* test(inspec): add tests based on existing Serverspec tests
* Follows on from #166
5 vuotta sitten