Blame bin/test_show_highstate.sh
|
Theo Chatzimichos |
1f0a34 |
#!/bin/bash
|
|
Theo Chatzimichos |
1f0a34 |
|
|
Theo Chatzimichos |
1f0a34 |
# Runs state.show_highstate using all localized grains' combinations
|
|
Theo Chatzimichos |
1f0a34 |
|
|
Theo Chatzimichos |
1f0a34 |
set -e
|
|
Theo Chatzimichos |
1f0a34 |
|
|
Theo Chatzimichos |
1f0a34 |
RUN_TEST="salt-call --local --retcode-passthrough state.show_highstate"
|
|
Theo Chatzimichos |
1f0a34 |
ROLES=$(bin/get_roles.py --yaml)
|
|
Theo Chatzimichos |
1f0a34 |
|
|
Theo Chatzimichos |
1f0a34 |
echo 'domain: infra.opensuse.org' > /etc/salt/grains
|
|
Theo Chatzimichos |
1f0a34 |
printf "city:\ncountry:\nsalt_cluster: opensuse\nvirt_cluster:\n$ROLES" > pillar/id/${HOSTNAME}.sls
|
|
Theo Chatzimichos |
1f0a34 |
|
|
Theo Chatzimichos |
1f0a34 |
sed -i -e 's/\(city:\).*/\1 nuremberg/' -e 's/\(country:\).*/\1 de/' -e 's/\(virt_cluster:\).*/\1 atreju/' pillar/id/${HOSTNAME}.sls
|
|
Theo Chatzimichos |
1f0a34 |
$RUN_TEST > /dev/null
|
|
Theo Chatzimichos |
1f0a34 |
echo "PASSED: country: de"
|
|
Theo Chatzimichos |
1f0a34 |
|
|
Theo Chatzimichos |
1f0a34 |
sed -i -e 's/\(city:\).*/\1 provo/' -e 's/\(country:\).*/\1 us/' -e 's/\(virt_cluster:\).*/\1 bryce/' pillar/id/${HOSTNAME}.sls
|
|
Theo Chatzimichos |
1f0a34 |
$RUN_TEST > /dev/null
|
|
Theo Chatzimichos |
1f0a34 |
echo "PASSED: country: us"
|