Commit Graph

134 Commits

Author SHA1 Message Date
Jorge Aparicio
cd2895a168 CI: make clippy check cfg(test) code, tests & examples 2024-05-22 14:16:53 +02:00
Jorge Aparicio
76d308c984
Merge pull request #43 from ferrous-systems/ja-immutable-subject-peer
turn `dns_test::{subject,peer}` into immutable statics
2024-05-22 14:16:27 +02:00
Jorge Aparicio
58239028f4 turn dns_test::{subject,peer} into immutable statics
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
2024-05-22 14:03:18 +02:00
Sebastian Ziebell
2e46421927 Check hickory-dns is fully started
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.
2024-05-21 15:05:29 +01:00
Jorge Aparicio
fe3961ffe1
Merge pull request #42 from ferrous-systems/ja-terminate-hickory
implement terminate for Hickory
2024-05-08 12:44:14 +02:00
Jorge Aparicio
4f277c1dbb implement terminate for Hickory
both in the NameServer and Resolver roles
2024-04-22 17:14:11 +02:00
Jorge Aparicio
6189787d9f
Merge pull request #51 from ferrous-systems/ja-hickory-name-server-take-2
support Hickory in the NameServer role
2024-04-22 16:51:29 +02:00
Jorge Aparicio
74e4797061 add a DNSSEC-disabled NameServer scenario test
to ensure that hickory-dns is correctly configured to work in NameServer
mode
2024-04-22 16:40:56 +02:00
Jorge Aparicio
ce222b3de1 support Hickory in NameServer role
note that because Hickory does not support pre-signed zone files all the
DNSSEC tests fail with it
2024-04-22 16:40:56 +02:00
Jorge Aparicio
05ffecec45 add a few NameServer role DNSSEC tests 2024-04-22 16:40:56 +02:00
Jorge Aparicio
4ce9ec9937
Merge pull request #50 from ferrous-systems/ja-ede-support-take-2
add support for Extended DNS Error (EDE)
2024-04-22 16:40:38 +02:00
Jorge Aparicio
b96aa89da9 add more EDE tests 2024-04-22 16:23:03 +02:00
Jorge Aparicio
4d31eca533 use Graph to simplify tests 2024-04-22 16:23:03 +02:00
Jorge Aparicio
7bb6b9439c add name_server::Graph 2024-04-22 16:23:03 +02:00
Jorge Aparicio
95f94e2c7b add first EDE test 2024-04-22 16:23:03 +02:00
Jorge Aparicio
31048f5cd0 extend DNSKEY API 2024-04-22 16:23:03 +02:00
Jorge Aparicio
dc19776107 parse EDE info from dig's output 2024-04-22 16:23:03 +02:00
Jorge Aparicio
166863bcc4 allow enabling Extended DNS Errors (EDE) 2024-04-22 16:23:03 +02:00
Jorge Aparicio
75de211a06
Merge pull request #49 from ferrous-systems/ja-resolver-builder-take-2
refactor: use builder pattern in Resolver ctor
2024-04-22 16:22:38 +02:00
Jorge Aparicio
70245e7ff8 refactor: use builder pattern in Resolver ctor
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
2024-04-22 16:18:47 +02:00
Jorge Aparicio
63c95fd0db
Merge pull request #48 from ferrous-systems/ja-refactor-impl-take-2
refactor Implementation branching into its own module
2024-04-22 16:18:24 +02:00
Jorge Aparicio
9689568974 refactor Implementation branching into its own module 2024-04-22 16:07:36 +02:00
Jorge Aparicio
4f024887e0 CI: test unbound (subject) against BIND (peers) 2024-03-28 21:41:31 +00:00
Jorge Aparicio
7aa9d543b4 support BIND in the NameServer role 2024-03-28 21:41:31 +00:00
Jorge Aparicio
d25cc923ec
Merge pull request #27 from ferrous-systems/ja-bind-impl
support using BIND in the Resolver role
2024-03-11 12:04:58 +01:00
Jorge Aparicio
90ee7b30f6 CI: run conformance tests against BIND 2024-03-11 11:59:56 +01:00
Jorge Aparicio
2c4ef88a98 support using BIND in the Resolver role 2024-03-11 11:59:56 +01:00
Jorge Aparicio
b8605f7944
Merge pull request #36 from ferrous-systems/ja-contraindications
README: cover dns-test automatic clean-up
2024-03-11 11:58:34 +01:00
Jorge Aparicio
f3bd5a1c55 README: cover dns-test automatic clean-up
and advise against running tests with cargo-watch
2024-03-07 16:04:18 +01:00
Андрей Листочкин (Andrei Listochkin)
6e303831a2
Merge pull request #32 from ferrous-systems/ja-readme-up
README: add some tips on writing tests
2024-03-01 21:31:12 +00:00
Jorge Aparicio
30ffd3882b README: add some tips on writing tests 2024-03-01 19:49:15 +01:00
Jorge Aparicio
49c89f764e
Merge pull request #25 from japaric/ja-impl-by-ref
take `Implementation` by reference
2024-02-26 14:53:39 +01:00
Jorge Aparicio
ab9b1e68cc also take Impl by ref in Resolver::new
mainly for symmetry. the existing tests don't clone the subject so the
code does not become any shorter
2024-02-26 14:48:48 +01:00
Jorge Aparicio
49b2abc6be take Impl by ref in NameServer::new
this eliminates the need for cloning in tests that use more than one
name server, making the code more succint / less noisy
2024-02-26 14:48:48 +01:00
Jorge Aparicio
19ae3d9083
Merge pull request #24 from japaric/ja-authority-section
parse authority section from dig's output
2024-02-26 14:44:44 +01:00
Jorge Aparicio
6fda01af00 parse authority section from dig's output 2024-02-26 14:40:33 +01:00
Андрей Листочкин (Andrei Listochkin)
72683a969d
Merge pull request #26 from japaric/ja-explicit-license
make license more visible
2024-02-26 13:27:12 +00:00
Андрей Листочкин (Andrei Listochkin)
eda8fd6ec3
Merge branch 'main' into ja-explicit-license 2024-02-26 13:13:45 +00:00
Андрей Листочкин (Andrei Listochkin)
a182db1a09
Merge pull request #16 from japaric/ja-signed-zone-mutation
allow signed zone file mutation
2024-02-26 11:58:58 +00:00
Jorge Aparicio
5f26698a51 make license more visible
it was already in the Cargo.toml metadata but add the files and mention
it in the README
2024-02-26 12:28:42 +01:00
Jorge Aparicio
a39afe6412 test a bogus DNSSEC scenario 2024-02-26 11:50:48 +01:00
Jorge Aparicio
b87ae21d2a make dig queries more configurable
switch from enum arguments like `Recurse` and `Dnssec` to a
build-pattern-based `Settings` struct
2024-02-26 11:50:48 +01:00
Jorge Aparicio
df344e57b1 fix integer types in RRSIG 2024-02-26 11:50:48 +01:00
Jorge Aparicio
16e83b1d6b move secure DNSSEC scenarios into a module 2024-02-26 11:50:48 +01:00
Jorge Aparicio
1592454395 allow mutation of signed zone file 2024-02-26 11:50:48 +01:00
Jorge Aparicio
57a1fc9231 parse more record types 2024-02-26 11:50:48 +01:00
Jorge Aparicio
66d6061ffc drop most zone_file entry types
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
2024-02-26 11:50:43 +01:00
Jorge Aparicio
a83b6629a3 drop generic lifetime parameters from types
none of the parsing we are doing requires a non-static lifetime
2024-02-26 11:43:25 +01:00
Jorge Aparicio
795adc32c2
Merge pull request #21 from japaric/ja-fix-ci
fix the explore example
2024-02-23 15:42:55 +01:00
Jorge Aparicio
56a9613615 fix the explore example 2024-02-23 15:35:51 +01:00