Use a temporary shared dir when testing

otherwise composer-cli is unable to glob() the kickstart
files and we're left without supported compose types. Seen
during AWS testing for example.

Helps with running some of the tests via sudo b/c this is
what Jenkins requires.

(cherry picked from commit b88466fd74)
This commit is contained in:
Alexander Todorov 2018-11-27 15:33:35 +02:00 committed by Brian C. Lane
parent 9c17c0cc6c
commit 8c409c8263

View File

@ -6,11 +6,15 @@ rm -rf /var/tmp/beakerlib-*/
export top_srcdir=`pwd`
. ./tests/testenv.sh
BLUEPRINTS_DIR=`mktemp -d '/tmp/blueprints.XXXXX'`
BLUEPRINTS_DIR=`mktemp -d '/tmp/composer-blueprints.XXXXX'`
cp ./tests/pylorax/blueprints/*.toml $BLUEPRINTS_DIR
SHARE_DIR=`mktemp -d '/tmp/composer-share.XXXXX'`
cp -R ./share/* $SHARE_DIR
chmod a+rx -R $SHARE_DIR
# start the lorax-composer daemon
./src/sbin/lorax-composer --sharedir ./share/ $BLUEPRINTS_DIR &
./src/sbin/lorax-composer --sharedir $SHARE_DIR $BLUEPRINTS_DIR &
# wait for the backend to become ready
tries=0