From 70fa9e4696010a3d72bc7abad4b741891fbda3fc Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 1 Jun 2020 08:18:24 -0500 Subject: [PATCH] Fix the AWS_BUCKET check Ensure that AWS tests are run if the AWS_BUCKET environment variable is set. Signed-off-by: Major Hayden --- schutzbot/run_tests.sh | 1 + schutzbot/test.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/schutzbot/run_tests.sh b/schutzbot/run_tests.sh index 756b43a30..00dbc9ddf 100755 --- a/schutzbot/run_tests.sh +++ b/schutzbot/run_tests.sh @@ -37,6 +37,7 @@ ansible-playbook \ ansible-osbuild/playbook.yml # Run the tests. +echo "The AWS_BUCKET env var is set to: ${AWS_BUCKET:-}" ansible-playbook \ -e workspace=${WORKSPACE} \ -e test_type=${TEST_TYPE:-base} \ diff --git a/schutzbot/test.yml b/schutzbot/test.yml index 7384f023c..2ec062cb2 100644 --- a/schutzbot/test.yml +++ b/schutzbot/test.yml @@ -43,7 +43,7 @@ when: - test_type == 'image' # Don't run the AWS test if the bucket env var is not set. - - (lookup('env', 'AWS_BUCKET') | default(false)) | bool + - lookup('env', 'AWS_BUCKET') | length > 0 - name: Show failed and passed tests debug: