New test: assert toml files in git workspace
tests: export BLUEPRINTS_DIR for use in tests Depending on the way the tests are run the directory may be a temporary dir, or it may be the standard /var/lib/lorax/... path. Related: rhbz#1714103
This commit is contained in:
parent
584cad72a0
commit
114c1bbda7
@ -43,6 +43,7 @@ __EOF__
|
|||||||
|
|
||||||
rlRun -t -c "$CLI blueprints push beakerlib.toml"
|
rlRun -t -c "$CLI blueprints push beakerlib.toml"
|
||||||
rlAssertEquals "pushed bp is found via list" "`$CLI blueprints list | grep beakerlib`" "beakerlib"
|
rlAssertEquals "pushed bp is found via list" "`$CLI blueprints list | grep beakerlib`" "beakerlib"
|
||||||
|
rlAssertExists "$BLUEPRINTS_DIR/git/workspace/master/beakerlib.toml"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "blueprints show"
|
rlPhaseStartTest "blueprints show"
|
||||||
@ -71,6 +72,7 @@ __EOF__
|
|||||||
rlPhaseStartTest "blueprints delete"
|
rlPhaseStartTest "blueprints delete"
|
||||||
rlRun -t -c "$CLI blueprints delete beakerlib"
|
rlRun -t -c "$CLI blueprints delete beakerlib"
|
||||||
rlAssertEquals "bp not found after delete" "`$CLI blueprints list | grep beakerlib`" ""
|
rlAssertEquals "bp not found after delete" "`$CLI blueprints list | grep beakerlib`" ""
|
||||||
|
rlAssertNotExists "$BLUEPRINTS_DIR/git/workspace/master/beakerlib.toml"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "start a compose with deleted blueprint"
|
rlPhaseStartTest "start a compose with deleted blueprint"
|
||||||
|
@ -59,6 +59,7 @@ if [ -z "$CLI" ]; then
|
|||||||
. ./tests/testenv.sh
|
. ./tests/testenv.sh
|
||||||
|
|
||||||
BLUEPRINTS_DIR=`mktemp -d '/tmp/composer-blueprints.XXXXX'`
|
BLUEPRINTS_DIR=`mktemp -d '/tmp/composer-blueprints.XXXXX'`
|
||||||
|
export BLUEPRINTS_DIR
|
||||||
cp ./tests/pylorax/blueprints/*.toml $BLUEPRINTS_DIR
|
cp ./tests/pylorax/blueprints/*.toml $BLUEPRINTS_DIR
|
||||||
|
|
||||||
SHARE_DIR=`mktemp -d '/tmp/composer-share.XXXXX'`
|
SHARE_DIR=`mktemp -d '/tmp/composer-share.XXXXX'`
|
||||||
@ -70,6 +71,7 @@ if [ -z "$CLI" ]; then
|
|||||||
./src/sbin/lorax-composer --sharedir $SHARE_DIR $BLUEPRINTS_DIR &
|
./src/sbin/lorax-composer --sharedir $SHARE_DIR $BLUEPRINTS_DIR &
|
||||||
else
|
else
|
||||||
export PACKAGE="composer-cli"
|
export PACKAGE="composer-cli"
|
||||||
|
export BLUEPRINTS_DIR="/var/lib/lorax/composer/blueprints"
|
||||||
systemctl stop lorax-composer
|
systemctl stop lorax-composer
|
||||||
setup_tests /usr/share/lorax /var/lib/lorax/composer/blueprints
|
setup_tests /usr/share/lorax /var/lib/lorax/composer/blueprints
|
||||||
systemctl start lorax-composer
|
systemctl start lorax-composer
|
||||||
|
Loading…
Reference in New Issue
Block a user