Giuseppe Vallarelli has posted comments on this change.

Change subject: Functional Tests [1/3]: Added module for dummy nics
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

Look at the comments.

....................................................
File tests/functional/Makefile.am
Line 20: 
Line 21: vdsmfunctestsdir = ${vdsmtestsdir}/functional
Line 22: 
Line 23: dist_vdsmfunctests_PYTHON = \
Line 24:     dummyUtils.py \
Alignment?
Line 25:        momTests.py \
Line 26:        networkTests.py \
Line 27:        sosPluginTests.py \
Line 28:        supervdsmFuncTests.py \


....................................................
File tests/functional/dummyUtils.py
Line 75: def setLinkDown(dummyName):
Line 76:     _setLinkState(dummyName, 'down')
Line 77: 
Line 78: 
Line 79: def _setLinkState(dummyName, state):
You can create 2 class constants STATE_UP, STATE_DOWN and provide them to 
setLinkState. Within setLinkState you can use an assert to verify that the link 
state provided if one of the allowed ones (the first thing to do).
assert state in (STATE_UP, STATE_DOWN).

when you invoke the function you will use something like:
setLinkState('dummy0', STATE_UP)

These 2 functions setLinkUp and setLinkUp don't do any useful work if not 
providing the state type.
Line 80:     activateDevice = [ip.cmd, 'link', 'set', 'dev', dummyName, state]
Line 81:     rc, _, _ = utils.execCmd(activateDevice, sudo=True)
Line 82:     if rc == SUCCESS:
Line 83:         return


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c7ed4110cd8d45a3fb7a9cc2cd2dc07004e96b9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to