diff --git a/openstack/tools/charmed_openstack_functest_runner.sh b/openstack/tools/charmed_openstack_functest_runner.sh index bea0c362..c36c94ec 100755 --- a/openstack/tools/charmed_openstack_functest_runner.sh +++ b/openstack/tools/charmed_openstack_functest_runner.sh @@ -12,6 +12,7 @@ MODIFY_BUNDLE_CONSTRAINTS=true REMOTE_BUILD= SKIP_BUILD=false SLEEP= +USE_JUJU29=false WAIT_ON_DESTROY=true . $(dirname $0)/func_test_tools/common.sh @@ -58,6 +59,9 @@ OPTIONS: enough capacity to boot the vms required by the tests. --sleep TIME_SECS Specify amount of seconds to sleep between functest steps. + --use-juju29 + Configure the framework to use juju 2.9 instead of 3.x (usually + to be able to test bionic-based code) --help This help message. EOF @@ -97,6 +101,9 @@ while (($# > 0)); do SLEEP=$2 shift ;; + --use-juju29) + USE_JUJU29=true + ;; --help|-h) usage exit 0 @@ -154,8 +161,12 @@ export TEST_JUJU3=1 # NOTE: this should not be necessary for > juju 2.x but since we still have a need for it we add it in export TEST_ZAZA_BUG_LP1987332=1 -# Some charms point to an upstream constraints file that installs python-libjuju 2.x so we need to do this to ensure we get 3.x -export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmers/zaza/master/constraints-juju34.txt +if $USE_JUJU29; then + export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmers/zaza/master/constraints-juju29.txt +else + # Some charms point to an upstream constraints file that installs python-libjuju 2.x so we need to do this to ensure we get 3.x + export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmers/zaza/master/constraints-juju34.txt +fi LOGFILE=$(mktemp --suffix=-charm-func-test-results) ( diff --git a/openstack/tools/openstack_regression_tests_runner.sh b/openstack/tools/openstack_regression_tests_runner.sh index 8b470996..bdb11b18 100755 --- a/openstack/tools/openstack_regression_tests_runner.sh +++ b/openstack/tools/openstack_regression_tests_runner.sh @@ -6,6 +6,7 @@ FUNC_TEST_PR= FUNC_TEST_TARGET= IMAGES_PATH=$HOME/tmp MODIFY_BUNDLE_CONSTRAINTS=true +USE_JUJU29=false . $(dirname $0)/func_test_tools/common.sh @@ -25,6 +26,9 @@ OPTIONS: By default we modify test bundle constraints to ensure that applications have the resources they need. For example nova-compute needs to have enough capacity to boot the vms required by the tests. + --use-juju29 + Configure the framework to use juju 2.9 instead of 3.x (usually + to be able to test bionic-based code) --help This help message. EOF @@ -46,6 +50,9 @@ while (($# > 0)); do --skip-modify-bundle-constraints) MODIFY_BUNDLE_CONSTRAINTS=false ;; + --use-juju29) + USE_JUJU29=true + ;; --help|-h) usage exit 0 @@ -113,8 +120,12 @@ export TEST_JUJU3=1 # NOTE: this should not be necessary for > juju 2.x but since we still have a need for it we add it in export TEST_ZAZA_BUG_LP1987332=1 -# Some charms point to an upstream constraints file that installs python-libjuju 2.x so we need to do this to ensure we get 3.x -export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmers/zaza/master/constraints-juju34.txt +if $USE_JUJU29; then + export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmers/zaza/master/constraints-juju29.txt +else + # Some charms point to an upstream constraints file that installs python-libjuju 2.x so we need to do this to ensure we get 3.x + export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmers/zaza/master/constraints-juju34.txt +fi # NOTE: this is the default applied in zaza-openstack-tests code but setting # explicitly so we can use locally.