Followup to #4068
Fix more missing tearDown code and fix a cli test that fails when run on a console.
Metadata Update from @tkopecek: - Pull-request tagged with: no_qe
Commit 2b45e988 fixes this pull-request
Pull-Request has been merged by tkopecek
Followup to #4068
Fix more missing tearDown code and fix a cli test that fails when run on a console.