From b67ce5379c737b0053b2ca3be0831d6726646357 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Tue, 28 May 2019 14:06:31 +0300 Subject: [PATCH] Use cloud credentials during test if they exist --- Makefile | 4 ++++ tests/test_cli.sh | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 54e9dee1..18b1191c 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/tests/test_cli.sh b/tests/test_cli.sh index c2f36af5..32112718 100755 --- a/tests/test_cli.sh +++ b/tests/test_cli.sh @@ -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