summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/nclient4/lease_test.go
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2022-09-10 17:13:29 +0100
committerGitHub <noreply@github.com>2022-09-10 17:13:29 +0100
commit662dd554284fba5ca82569386c953788aabb6572 (patch)
tree95ebc09073ce043dc8097f52cf9c2837235a292f /dhcpv4/nclient4/lease_test.go
parenta91ce0db92a593b386863adceaf420b01f5de1a3 (diff)
parent74d7c5e9788cc201369a044b99dd0b3bb29eac53 (diff)
Merge branch 'master' into fix_label
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