summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/nclient4/lease_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4/nclient4/lease_test.go')
-rw-r--r--dhcpv4/nclient4/lease_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/dhcpv4/nclient4/lease_test.go b/dhcpv4/nclient4/lease_test.go
index 361847f..d27eeca 100644
--- a/dhcpv4/nclient4/lease_test.go
+++ b/dhcpv4/nclient4/lease_test.go
@@ -1,4 +1,4 @@
-// this tests nclient4 with lease and release
+// this tests nclient4 with lease, renew and release
package nclient4
@@ -236,6 +236,14 @@ func (sll *testServerLeaseList) runTest(t *testing.T) {
sll.lastTestSvrErrLock.RLock()
keepgoing := chkerr(err, sll.lastTestSvrErr, l.ShouldFail, t)
sll.lastTestSvrErrLock.RUnlock()
+
+ if keepgoing {
+ err = clnt.Renew(context.Background(), lease)
+ sll.lastTestSvrErrLock.RLock()
+ keepgoing = chkerr(err, sll.lastTestSvrErr, l.ShouldFail, t)
+ sll.lastTestSvrErrLock.RUnlock()
+ }
+
if keepgoing {
err = clnt.Release(lease)
//this sleep is to make sure release is handled by server