Doug Hellmann | 94129c7 | 2017-01-09 21:24:24 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # Tests for DevStack INI functions |
| 4 | |
| 5 | TOP=$(cd $(dirname "$0")/.. && pwd) |
| 6 | |
| 7 | source $TOP/functions-common |
| 8 | source $TOP/inc/python |
| 9 | |
| 10 | source $TOP/tests/unittest.sh |
| 11 | |
| 12 | echo "Testing Python 3 functions" |
| 13 | |
| 14 | # Initialize variables manipulated by functions under test. |
Doug Hellmann | 94129c7 | 2017-01-09 21:24:24 +0000 | [diff] [blame] | 15 | export DISABLED_PYTHON3_PACKAGES="" |
| 16 | |
Doug Hellmann | 36377f6 | 2018-12-04 11:33:03 -0500 | [diff] [blame] | 17 | assert_true "should be enabled by default" python3_enabled_for testpackage1 |
Doug Hellmann | 94129c7 | 2017-01-09 21:24:24 +0000 | [diff] [blame] | 18 | |
| 19 | assert_false "should not be disabled yet" python3_disabled_for testpackage2 |
| 20 | |
| 21 | disable_python3_package testpackage2 |
| 22 | assert_equal "$DISABLED_PYTHON3_PACKAGES" "testpackage2" "unexpected result" |
| 23 | assert_true "should be disabled" python3_disabled_for testpackage2 |
| 24 | |
| 25 | report_results |