Use cloud credentials during test if they exist

This commit is contained in:
Alexander Todorov 2019-05-28 14:06:31 +03:00 committed by Lars Karlitski
parent 6c2b34bf15
commit b67ce5379c
2 changed files with 13 additions and 0 deletions

View File

@ -150,6 +150,10 @@ $(VM_IMAGE): srpm bots
--run-command "chmod +x /var/tmp/vm.install" \
--run-command "cd /var/tmp; /var/tmp/vm.install $$srpm" \
$(TEST_OS)
[ -f "~/.config/lorax-test-env" ] && bots/image-customize \
--upload ~/.config/lorax-test-env:/var/tmp/lorax-test-env \
$(TEST_OS) || echo
# convenience target for the above
vm: $(VM_IMAGE)

View File

@ -29,6 +29,15 @@ function teardown_tests {
mv $1/composer/live-iso.ks.orig $1/composer/live-iso.ks
}
# cloud credentials
if [ -f "~/.config/lorax-test-env" ]; then
. ~/.config/lorax-test-env
fi
if [ -f "/var/tmp/lorax-test-env" ]; then
. /var/tmp/lorax-test-env
fi
if [ -z "$CLI" ]; then
export top_srcdir=`pwd`
. ./tests/testenv.sh