diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2022-09-10 14:12:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 14:12:18 +0100 |
commit | 74d7c5e9788cc201369a044b99dd0b3bb29eac53 (patch) | |
tree | f44aedeff9a309bc5aa31122b14370abd4a1af79 /dhcpv4/nclient4/lease_test.go | |
parent | 69cde97383c2cb98112b7dd6e4b20198b8c38353 (diff) | |
parent | 0bb6da28c4dba193221eb2067be1900abf3ef6d6 (diff) |
Merge pull request #469 from twelho/fix-nil-options
dhcpv4: support RENEW requests and option deletion
Diffstat (limited to 'dhcpv4/nclient4/lease_test.go')
-rw-r--r-- | dhcpv4/nclient4/lease_test.go | 10 |
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 |