action #13868
closedisotovideo should support test postrun hook
30%
Description
When testing installation with SCC enabled, SUT is registered within SCC. After test is finished, this SUT is supposed to unregister itself to avoid cluttering SCC database. But if test is aborted, due to either fatal error or new iso rescheduling, this unregistration does not happen.
I propose to reintroduce mechanism which will run after tests are finished. This hook should run everytime regardless how test run finishes. As a bonus we can pass info if test was completed or aborted.
One thing is required (for the SCC usecase) and it is access to variables set during regular test run. Unique SCC regkey is needed for unregistering the SUT and this key is obtained during registration.
Updated by mkravec over 8 years ago
Enabling "autotest::postrun_hook" in isotovideo after "446: bmwqemu::load_vars()" gives access to variables. This should be enough for system de-registration task.
Will create PR after few tests.
Updated by okurz about 8 years ago
- Status changed from New to Resolved
There is the method post_run_hook
in os-autoinst already. Just like post_fail_hook
the pre_run_hook
and post_run_hook
can be overridden in test modules.
I assume the feature is done and no changes necessary. If not, please reopen and state what is missing.
Updated by oholecek about 8 years ago
- Status changed from Resolved to New
Well, post_run_hook is run after each individual test module, which is not what is wanted here. SCC deregistration should be done after whole test job is finished (and even that has some problems so at the end SCC usecase will need to be implemented in different way).
There is autotest::postrun_hook but is is currently dead code. After coolo`s backend work it was left disabled, intentionally after discussion since we didn't have use case for it that time.
Updated by coolo about 8 years ago
But the user story is dead. So I'm opting to reject this - and not leave a High prio issue around we don't need
Updated by oholecek about 8 years ago
- Status changed from New to Rejected
High priority is wrong, SCC user story is dead. The current code is dead, so I'll remove it completely.