Change in ovirt-engine[master]: restapi: remove usb check from round trip tests

mpastern at redhat.com mpastern at redhat.com
Thu Dec 27 09:18:50 UTC 2012


Michael Pasternak has submitted this change and it was merged.

Change subject: restapi: remove usb check from round trip tests
......................................................................


restapi: remove usb check from round trip tests

Remove the check whether the usb's enabled state remains the same in
round trip mapping test of VmMapper and TemplateMapper.

This check is incorrect because:

1. in case the received usb setting is enabled but with no valid type,
it could be mapped to disabled (if it's a request to add new entity or if
the previous usb setting of the entity was disabled) and remains disabled
while mapping it back to rest api VM. thus checking that the enabled
state of the given usb setting remains the same in the round trip mapping
without checking that its type is valid is wrong.

2. the usb mapping was removed from the map methods of VmMapper and
TemplateMapper classes, as it's overridden by the caller anyway (because
the usb mapping requires information that cannot be access from inside of
the map methods). so it makes no sense to check the usb settings it in
this test that tests the map methods.

Change-Id: Ib7ce32dca6821a8b6eb8d69fe18413c87a6f0b3f
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/TemplateMapperTest.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/VmMapperTest.java
2 files changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Michael Pasternak: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/10405
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7ce32dca6821a8b6eb8d69fe18413c87a6f0b3f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>



More information about the Engine-commits mailing list