mirror of
https://github.com/alexhopeoconnor/dnsmasq-webui.git
synced 2026-10-22 01:42:08 +10:00
Refactor: ServiceCollectionExtensions data-driven registration; LeasesCache + FSW; test harness scripts
This commit is contained in:
Vendored
+9
-4
@@ -1,10 +1,15 @@
|
||||
# Test data for docker-compose.test.yml
|
||||
# Test data
|
||||
|
||||
Used in two ways:
|
||||
|
||||
1. **Unit tests** – Parsers and services read from `testdata/` (e.g. `testdata/leases` for lease-format tests).
|
||||
2. **Docker test harness** – Run `scripts/prepare-test-mount.sh` to copy this into `testdata-mount/` (gitignored). Compose mounts `testdata-mount` as `/data`. **leases** is excluded from the copy so dnsmasq creates and owns the real leases file in the harness.
|
||||
|
||||
Files:
|
||||
|
||||
- **hosts** – Shared by app and dnsmasq (read/write by app, `addn-hosts` for dnsmasq).
|
||||
- **dnsmasq.conf** – Sample main config (reference only; not used by the test containers).
|
||||
- **dnsmasq-test.conf** – Config for dnsmasq when run inside the app container (DHCP-only, paths under `/data`).
|
||||
- **dnsmasq.d/dhcp.conf** – DHCP static hosts; app edits this, dnsmasq loads it via `conf-dir`.
|
||||
- **dnsmasq.d/01-other.conf** – Other snippet (not managed by app).
|
||||
- **leases** – Empty at start. dnsmasq creates and populates it when the dhcp-client container gets a lease. App reads it (read-only).
|
||||
|
||||
All of this is bind-mounted as `/data` in the **app** container; the app runs as the main process and dnsmasq runs in the background in the same container.
|
||||
- **leases** – For **unit tests only**. In the Docker harness, dnsmasq creates `/data/leases`; the app watches it and shows live leases.
|
||||
|
||||
Reference in New Issue
Block a user