Skip to content

Unit tests for dnsmasq lease state propagation #116

@lukasjuhrich

Description

@lukasjuhrich

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 the auth_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:

def test_add_lease():
pass

The lease server is not completely untested, however: Some bats tests check whether the lease invalidation on refresh works correctly, which at least uses

  • the capability of dnsmasq to correctly reconstruct the lease state using the init command
  • the capability of the lease server to accept the delete command and delete the corresponding row in the leases table

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions