source "${OET_PATH}/libs/locallibs/common_lib.sh"
function pre_test() {
LOG_INFO "Start environmental preparation."
DNF_INSTALL "python-stestr"
mkdir -p ./test_repo
cd ./test_repo
stestr-3 init
touch test1.py test2.py
stestr-3 run
LOG_INFO "End of environmental preparation!"
}
function run_test() {
LOG_INFO "Start to run test."
stestr-3 failing
CHECK_RESULT $? 0 0 "stestr-3 failing command failed"
stestr-3 failing --subunit
CHECK_RESULT $? 0 0 "stestr-3 failing --subunit command failed"
stestr-3 failing --list
CHECK_RESULT $? 0 0 "stestr-3 failing --list command failed"
stestr-3 failing --subunit --list
CHECK_RESULT $? 0 0 "stestr-3 failing --subunit --list command failed"
LOG_INFO "End of the test."
}
function post_test() {
LOG_INFO "start environment cleanup."
DNF_REMOVE "python-stestr"
cd ..
rm -rf ./test_repo
LOG_INFO "End of environment cleanup!"
}
main "$@"