Commit graph

8 commits

Author SHA1 Message Date
Sebastian Engel
3d1581e726
style(default.sls): fix minor typo 2023-09-11 20:32:01 +02:00
Imran Iqbal
5f80cf2b7d
ci(kitchen): use pillars_from_directories under provisioner
* Automated using https://github.com/myii/ssf-formula/pull/383
2021-11-16 21:55:32 +00:00
Daniel Dehennin
7708e12923
test(pillar): use static test/salt/pillar/top.sls
The kitchen-salt provisionner have the `pillars_from_directories`
option to recusively copy directories under target pillar root.

This has 3 advantages:

- simplify `kitchen.yml`

- manage pillar assignment with standard salt targetting mechanism,
  this avoid the dedicated `gentoo` suite (it could have been done
  from `kitchen.yml` itself by the way)

- ease the test outside kitchen by running `salt-call` directly with
  `--pillar-root` like:
  ```
  salt-call --local --id test-minion.example.net \
    --file-root=template-formula/ \
    --pillar-root=template-formula/test/salt/pillar/ \
    state.show_sls TEMPLATE
  ```

* pillar.example: remove settings for testing purpose.

* test/salt/pillar/top.sls: limit `gentoo` pillars based on `os_family`
  grain.

* test/salt/pillar/defaults.sls: base pillar dedicated to tests.

* kitchen.yml (suites): remove the now useless `gentoo` suite.
  Define `pillars_from_directories` to copy them under `pillar_root`.
  Remove useless `pillars_from_files`.

* .gitlab-ci.yml: fix gentoo suite name

* .gitignore: do not ignore test pillar `top.sls`
2021-11-16 21:25:26 +00:00
Imran Iqbal
4c2f4ede02
feat: add Gentoo support
Make use of the new pre-salted images:

* https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/-/merge_requests/55
2020-10-12 07:33:44 +01:00
Imran Iqbal
97309c6f4d
ci(kitchen+travis): fix centos6 suite and rename to upstart
* Semi-automated using https://github.com/myii/ssf-formula/pull/247
* Problems identified while reviewing:
  - https://github.com/saltstack-formulas/template-formula/pull/203
2020-09-01 18:52:51 +01:00
Dafydd Jones
2e8ded6565 refactor: improve reusability using an unique keyword TEMPLATE
BREAKING CHANGE: changed all state names and ids
2019-12-04 23:47:41 +00:00
Imran Iqbal
e76525f130
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix errors shown below:

```bash
template-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./test/integration/default/inspec.yml
  1:1       warning  missing document start "---"  (document-start)

./template/osfamilymap.yaml
  1:89      error    line too long (116 > 88 characters)  (line-length)
  1:24      error    trailing spaces  (trailing-spaces)
  13:2      error    syntax error: found character '%' that cannot start any token

pillar.example
  14:4      error    syntax error: found character '%' that cannot start any token
```
2019-08-07 18:27:31 +01:00
Daniel Dehennin
13f1728c27 test(libtofs): “tofs.files_switch” lookup can return a list
We need to verify that “libtofs” works when the “tofs.files_switch”
lookup return a list instead of a single element.

* kitchen.yml (provisioner): copy tests specific pillars into the test
  environment.

* pillar.example (template.tofs.files_switch): lookup for “roles” at
  the end.

* test/salt/pillar/test.sls (roles): list of roles to apply during
  tests.

* test/integration/default/controls/config_spec.rb: add “roles” to the
  list of “tofs.files_switch” items to verify.
2019-07-24 12:13:53 +02:00