sclorg / container-common-scripts

Apache License 2.0
20 stars 45 forks source link

exit on cleanup for openshift remote cluster #233

Closed zmiklank closed 2 years ago

zmiklank commented 2 years ago

Till this moment stopping of the openshift test suite was done with exit -e, when the user typed ctrl-c. This approach is changing, because if set -e is used the whole test suite fails on the first failed test.

This means that ct_os_cleanup function should be able to gracefully(?) clean up the resources and exit the testing.

The only use case, where ct_os_cleanup is used is for the trap builtin, reacting to EXIT and SIGINT. In both cases the added exits should not cause any harm.

I am not really sure about the approach I proposed with this PR, but I did not find any better one. If you see some better solution, please propose it.