Change in vdsm[master]: netinfo: Do not mix local time and UTC, improve tests
danken at redhat.com
danken at redhat.com
Fri Feb 7 15:08:38 UTC 2014
Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: Do not mix local time and UTC, improve tests
......................................................................
Patch Set 4: Code-Review-1
(3 comments)
minor comment about comments remain.
http://gerrit.ovirt.org/#/c/24192/4/tests/functional/networkTests.py
File tests/functional/networkTests.py:
Line 1689: @permutations([['default'], ['local']])
Line 1690: @cleanupNet
Line 1691: @RequireVethMod
Line 1692: @ValidateRunningAsRoot
Line 1693: def testDhclientLeases(self, dateFormat):
You have convinced me that the test is useful: we test getDhclientIfaces(), and we want to make sure it works with both values of db-time-format.
Line 1694: dhcp4 = set()
Line 1695: with vethIf() as (server, client):
Line 1696: with avoidAnotherDhclient(client):
Line 1697:
Line 1702:
Line 1703: with namedTemporaryDir(dir='/var/lib/dhclient') as tmpDir:
Line 1704: confFile = os.path.join(tmpDir, 'test.conf')
Line 1705: leaseFile = os.path.join(tmpDir, 'test.lease')
Line 1706: pidFile = os.path.join(tmpDir, 'test.pid')
In a follow-up patch, please generate pidFile within dhcp.runDhclient() - we do not tweak it or care about it. it's a dhclient implementation detail.
Line 1707:
Line 1708: with open(confFile, 'w') as f:
Line 1709: f.write('db-time-format {0};'.format(dateFormat))
Line 1710:
http://gerrit.ovirt.org/#/c/24192/4/tests/netinfoTests.py
File tests/netinfoTests.py:
Line 301: ' interface "valid";\n'
Line 302: ' expire {0:%w %Y/%m/%d %H:%M:%S};\n'
Line 303: '}}\n'
Line 304: 'lease {{\n' # in an actual lease file,
Line 305: ' interface "valid2";\n' # human-readable date follows:
but to simulate an actual lease file, this comment should be inside the string.
Line 306: ' expire epoch {1:.0f};\n'
Line 307: # expire epoch 2117041460; # Sat Jan 31 20:04:20 2037
Line 308: '}}\n'
Line 309: 'lease {{\n'
--
To view, visit http://gerrit.ovirt.org/24192
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b2a33209b45001c427d5712d57326394cbeb9d0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list