Antoni Segura Puimedon has posted comments on this change.
Change subject: net_functional_tests: bondWithManyVlans.
......................................................................
Patch Set 1: (4 inline comments)
....................................................
File tests/functional/networkTests.py
Line 45: @cleanupNet
Line 46: @permutations([[True], [False]])
Line 47: @RequireDummyMod
Line 48: @ValidateRunningAsRoot
Line 49: def testSetupNetworksAddBondWithManyVlans(self, bridged):
Unfortunately that is not possible. It is very important to test the
combination, and there is specific code that is directed to
enable/disable/handle the combination of networks.
Line 50: VLAN_COUNT = 5
Line 51: network_names = [NETWORK_NAME + str(tag) for tag in
range(VLAN_COUNT)]
Line 52: with dummyIf(2) as nics:
Line 53: networks = dict((vlan_net,
Line 58:
Line 59: with self.vdsm_net.pinger():
Line 60: status, msg = self.vdsm_net.setupNetworks(networks,
bondings,
Line 61: {})
Line 62: net_info = self.vdsm_net.getNetInfo()
Do you have any solution that is not implicitly getting three snapshots to
check for three things? Cause that would make the tests so long running to run
that it will go against the willingness to run them.
Line 63: self.assertEqual(status, SUCCESS, msg)
Line 64: for vlan_net in network_names:
Line 65: self.assertTrue(self.vdsm_net.networkExists(vlan_net,
bridged,
Line 66: net_info))
Line 142: nics=nics,
Line 143: opts={'bridged':
bridged})
Line 144: self.assertEqual(status, SUCCESS, msg)
Line 145:
Line 146: net_info = self.vdsm_net.getNetInfo()
After adding network, the network information doesn't change. Thus, it is
senseless to make two netinfo requests to the server when one would suffice.
Line 147: self.assertTrue(self.vdsm_net.networkExists(NETWORK_NAME,
bridged,
Line 148: net_info))
Line 149: self.assertTrue(self.vdsm_net.bondExists(BONDING_NAME,
nics,
Line 150: net_info))
....................................................
File tests/functional/utils.py
Line 166: return bond_name in info.bondings and \
Line 167: (not nics or set(nics) ==
set(info.bondings[bond_name]['slaves']))
Line 168:
Line 169: def vlanExists(self, vlan_name, info=None):
Line 170: if info is None:
explained in networkTests.
Line 171: info =
netinfo.NetInfo(self.vdscli.getVdsCapabilities()['info'])
Line 172: return vlan_name in info.vlans
Line 173:
Line 174: def getNetInfo(self):
--
To view, visit http://gerrit.ovirt.org/16025
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9da7bd407cfbd9acab5e20384bff1254c26ffc5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches