-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit tests for dnsmasq lease state propagation #116
Comments
A low-hanging fruit would be to extend the existing hades/tests/test-auth-dhcp.bats Lines 58 to 87 in d8a48d4
|
lukasjuhrich
added a commit
that referenced
this issue
Jul 7, 2022
lukasjuhrich
added a commit
that referenced
this issue
Sep 10, 2022
lukasjuhrich
added a commit
that referenced
this issue
Sep 10, 2022
lukasjuhrich
added a commit
that referenced
this issue
Sep 10, 2022
lukasjuhrich
added a commit
that referenced
this issue
Sep 10, 2022
sebschrader
pushed a commit
that referenced
this issue
Sep 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dnsmasq's internal knowledge about the leases is hidden in memory.
For that reason, we use a
--dhcp-script
to persistently mirror this state in theauth_dhcp_leases
table (also for unauth).Furthermore, dnsmasq bootstraps this state by passing said script the
init
command.To ensure correctness of this synchronization, we should add unit tests for the
lease_server
.Mainly, this means extending test stubs like the following:
hades/tests/test_lease_sync.py
Lines 69 to 70 in d8a48d4
The lease server is not completely untested, however: Some bats tests check whether the lease invalidation on refresh works correctly, which at least uses
init
commanddelete
command and delete the corresponding row in the leases tableThe text was updated successfully, but these errors were encountered: