Decorate volume.base functions - fix cleanup
There are functions set as classmethod while used in testcase
The cleanup done on class level and not part of the testcase
The problem is that we may see testcase pass while the
resource_cleanup fails on classlevel instead of the test fail.
Maintaine and support proper cleanup ordering when functions
are classbase while other instances.
Current fix contains class descriptor that learn caller
in case its a class it will use the class cleanup
in case its an instance it will use instance cleanup.
Expecting to see failures due to wrong cleanup in tests
result from the wrong impelementaions.
Added unittests for cleanup_order decorator
Updated test_groups cleanup , volume can not be deleted
before group, class level cleanup hides it because group
clean was instance level.
See scenario methods as reference (manager)
Change-Id: I27328bf6c176840c7762bd97f596481ffa6f5736
5 files changed