Change in vdsm[master]: Added tests for _addNetworkValidation and helpers.

danken at redhat.com danken at redhat.com
Wed Aug 1 19:51:57 UTC 2012


Dan Kenigsberg has submitted this change and it was merged.

Change subject: Added tests for _addNetworkValidation and helpers.
......................................................................


Added tests for _addNetworkValidation and helpers.

Helpers are: validateVlanId, validateBondingName and validateBondingOptions.

The test for validateBondingOptions monkey patches os.path.exists to allow to
test just the logic of the method, which uses sysfs to determine if the option
is valid.

The test of _addNetworkValidation goes over the logic branches to test that
the proper exceptions are thrown. It monkey patches the network detection
method of the netinfo module to avoid real network detection at test time.

Change-Id: Ifd8bb649685fac00640e894a4484cdb0cc0b2f1c
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M tests/configNetworkTests.py
1 file changed, 228 insertions(+), 0 deletions(-)

Approvals:
  Dan Kenigsberg: Looks good to me, approved
  Igor Lvovsky: Verified


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd8bb649685fac00640e894a4484cdb0cc0b2f1c
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>


More information about the vdsm-patches mailing list