Skip to content

Commit

Permalink
test(libmatcher): custom delimiter test added
Browse files Browse the repository at this point in the history
  • Loading branch information
blu-base committed Aug 30, 2024
1 parent 0bdead6 commit b575030
Show file tree
Hide file tree
Showing 32 changed files with 111 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/convert-formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ convert_formula() {

git mv TEMPLATE "$NEW_NAME"

git mv test/salt/states/TEMPLATE "test/salt/states/$NEW_NAME"

# Replace TEMPLATE within sls and jinja files with py-safe formula name
# due to python limitations on identifier names (no hyphen)
# including when specifying jinja context variables
Expand Down
5 changes: 5 additions & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ provisioner:
- .git
pillars_from_directories:
- test/salt/pillar
dependencies:
- name: parameters
path: ./test/salt/states
- name: TEMPLATE
path: ./test/salt/states

platforms:
## SALT `tiamat`
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/amazonlinux-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: cronie
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/arch-base-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/centos-6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: cronie
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/fedora-31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/fedora-32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/fedora-33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/fedora-34.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/fedora-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/fedora-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/gentoo-2-sysd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: app-shells/bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/gentoo-2-sysv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: app-shells/bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/opensuse-15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/oraclelinux-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/oraclelinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/rockylinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
3 changes: 3 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ values:
- C@TEMPLATE:lookup
- C@TEMPLATE
- Y:G@id
- Y:I:!@nested!pillar
master: template-master
nested:
added_in_value: yaml
pkg:
name: bash
rootgroup: root
Expand Down
4 changes: 4 additions & 0 deletions test/salt/pillar/default.sls
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ TEMPLATE:
# Just for testing purposes
winner: pillar
added_in_pillar: pillar_value
nested:
added_in_value: pillar
nested:
pillar: nested_pillar_value
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
#
# Used to test custom delimiters
---
values:
nested:
added_in_value: yaml
...
10 changes: 10 additions & 0 deletions test/salt/states/parameters/map_jinja.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
#
# Used to test custom delimiters
---
merge_lists: true
values:
sources:
- Y:I:!@nested!pillar
...

0 comments on commit b575030

Please sign in to comment.