From 82e9799d8c8669dde60f4c1b62d6f070fa9acc64 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Nov 12 2017 15:47:08 +0000 Subject: rename the test_show_highstate script's extension to reflect reality --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e0c7c4..ce452b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ test_show_highstate: - ln -s $PWD/pillar /srv/pillar - sed -i -e 's/^production:$/base:/' /srv/{salt,pillar}/top.sls - bin/get_formulas.py -c /srv/formula -s - script: bin/test_show_highstate.py + script: bin/test_show_highstate.sh tags: - docker diff --git a/bin/test_show_highstate.py b/bin/test_show_highstate.py deleted file mode 100755 index bf70ded..0000000 --- a/bin/test_show_highstate.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Runs state.show_highstate using all localized grains' combinations - -set -e - -RUN_TEST="salt-call --local --retcode-passthrough state.show_highstate" -ROLES=$(bin/get_roles.py --yaml) - -echo 'domain: infra.opensuse.org' > /etc/salt/grains -printf "city:\ncountry:\nsalt_cluster: opensuse\nvirt_cluster:\n$ROLES" > pillar/id/${HOSTNAME}.sls - -sed -i -e 's/\(city:\).*/\1 nuremberg/' -e 's/\(country:\).*/\1 de/' -e 's/\(virt_cluster:\).*/\1 atreju/' pillar/id/${HOSTNAME}.sls -$RUN_TEST > /dev/null -echo "PASSED: country: de" - -sed -i -e 's/\(city:\).*/\1 provo/' -e 's/\(country:\).*/\1 us/' -e 's/\(virt_cluster:\).*/\1 bryce/' pillar/id/${HOSTNAME}.sls -$RUN_TEST > /dev/null -echo "PASSED: country: us" diff --git a/bin/test_show_highstate.sh b/bin/test_show_highstate.sh new file mode 100755 index 0000000..bf70ded --- /dev/null +++ b/bin/test_show_highstate.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Runs state.show_highstate using all localized grains' combinations + +set -e + +RUN_TEST="salt-call --local --retcode-passthrough state.show_highstate" +ROLES=$(bin/get_roles.py --yaml) + +echo 'domain: infra.opensuse.org' > /etc/salt/grains +printf "city:\ncountry:\nsalt_cluster: opensuse\nvirt_cluster:\n$ROLES" > pillar/id/${HOSTNAME}.sls + +sed -i -e 's/\(city:\).*/\1 nuremberg/' -e 's/\(country:\).*/\1 de/' -e 's/\(virt_cluster:\).*/\1 atreju/' pillar/id/${HOSTNAME}.sls +$RUN_TEST > /dev/null +echo "PASSED: country: de" + +sed -i -e 's/\(city:\).*/\1 provo/' -e 's/\(country:\).*/\1 us/' -e 's/\(virt_cluster:\).*/\1 bryce/' pillar/id/${HOSTNAME}.sls +$RUN_TEST > /dev/null +echo "PASSED: country: us"