using `std::env::set_var` to set or change the value of either
DNS_TEST_SUBJECT or DNS_TEST_PEER is A Bad Idea, specially so when
tests are running in parallel
we can't forbid the use of `env::set_var` _but_ at least we can ensure
that even in its presence the return value of `dns_test::{subject,peer}`
will not change
this is accomplished using a "lazy" static variable that gets
initialized at most once during the lifetime of the process instead of
reading the env var each time `{subject,peer}` is called
to better convey the fact that the return value of `{subject,peer}`
won't change, we present them as static variables instead
When starting `hickory-dns` there is no easy way to check the start
sequence has finished & its fully ready to accept connections. Other
tools, e.g. unbound, are designed as services, they will correctly
manage their `pidfile`. They also could be queried by the `servicectl`
inside the Docker container.
the `start` constructor's parameter list was getting long and we want to
add even more configuration options, like EDE, in the future.
using the builder pattern lets us introduce new settings without
breaking changes
instead use the record types in zone files
the main difference between e.g. zone_file::A and record::A was that the
latter had a TTL filed and the former didn't
to eliminate code duplication we make the `ZoneFile` API use the
`record` types and discard the zone_file entry types
without this `DNS_TEST_SUBJECT="hickory $URL" cargo t` was re-building
hickory from scratch even when its source had not change
not including the `.git` directory in the hickory repository lets Docker
see that the source code has not changed
* add new type `Network` that holds `Arc`
* adjust network name to use `CARGO_PKG_NAME` env var, process id and
counter
* remove function to remove network
* clone Network in container
* refactor Network tests
The list of attached containers is determined, all of them are
disconnected from the network, then the network is deleted.
* set net mask in unbound conf template
* expose container id