devstack/tests/test_python.sh
Doug Hellmann 36377f63e3 install under python3 by default when enabled
Remove the requirement that services explicitly enable python3 support
in order to be tested under python3 when running with python3
enabled. Keep the enable_python3_package() function for backwards
compatibility, for now, since it is called in some devstack plugins.

Explicitly add swift to the set of packages that should not be installed
using python3 by default until full support is available.

Change-Id: I8ab0a7c242bbf5bf3f091f5a85a98e2f4543f856
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2019-01-09 09:05:36 -05:00

26 lines
662 B
Bash
Executable File

#!/usr/bin/env bash
# Tests for DevStack INI functions
TOP=$(cd $(dirname "$0")/.. && pwd)
source $TOP/functions-common
source $TOP/inc/python
source $TOP/tests/unittest.sh
echo "Testing Python 3 functions"
# Initialize variables manipulated by functions under test.
export DISABLED_PYTHON3_PACKAGES=""
assert_true "should be enabled by default" python3_enabled_for testpackage1
assert_false "should not be disabled yet" python3_disabled_for testpackage2
disable_python3_package testpackage2
assert_equal "$DISABLED_PYTHON3_PACKAGES" "testpackage2" "unexpected result"
assert_true "should be disabled" python3_disabled_for testpackage2
report_results