Change in vdsm[master]: tests: Generalize sdm_indirection_tests

danken at redhat.com danken at redhat.com
Fri Sep 25 16:18:43 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

Change subject: tests: Generalize sdm_indirection_tests
......................................................................


tests: Generalize sdm_indirection_tests

The infrastructure in sdm_indirection_tests is useful for testing the
other classes where there is indirection:

    Image -> ImageManifest
    Volume -> VolumeMetadata

In order to reuse this code we need to generalize two things:
1. The class doing the redirection is not necessarily a StorageDomain.
It can also be an Image or Volume.
2. Each class that redirects calls for SDM contains an instance of the
redirection target class.  For example, StorageDomains contain a field
'_manifest' which is a StorageDomainManifest instance.

The generalization can be done by extracting the general purpose bits
from DomainTestMixin into SDMIndirectionMixin.  When Image and Volume
support will be added to this module we can subclass
SDMIndirectionMixin as we are now doing for DomainTestMixin.

Change-Id: Icb68cb27d4e36c22f74a1cc445f38bea4d0ce4da
Signed-off-by: Adam Litke <alitke at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/46259
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Continuous-Integration: Jenkins CI
---
M tests/sdm_indirection_tests.py
1 file changed, 43 insertions(+), 30 deletions(-)

Approvals:
  Adam Litke: Verified
  Nir Soffer: Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/46259
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb68cb27d4e36c22f74a1cc445f38bea4d0ce4da
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list