From b31e5e2f911080e348d76f767d3003a8f8c26738 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 9 Jan 2025 19:22:51 -0500 Subject: [PATCH] tests: dnsexit2: Add test for two hosts in the same zone --- t/protocol_dnsexit2.pl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/t/protocol_dnsexit2.pl b/t/protocol_dnsexit2.pl index ac20cac..85ea6c9 100644 --- a/t/protocol_dnsexit2.pl +++ b/t/protocol_dnsexit2.pl @@ -139,6 +139,47 @@ my @test_cases = ( }, ], }, + { + desc => 'two hosts, same zone', + cfg => { + 'host1.example.com' => { + ttl => 5, + wantipv4 => '192.0.2.1', + zone => 'example.com', + }, + 'host2.example.com' => { + ttl => 10, + wantipv6 => '2001:db8::1', + zone => 'example.com', + }, + }, + want => [ + { + apikey => 'key', + domain => 'example.com', + update => [ + { + content => '192.0.2.1', + name => 'host1', + ttl => 5, + type => 'A', + }, + ], + }, + { + apikey => 'key', + domain => 'example.com', + update => [ + { + content => '2001:db8::1', + name => 'host2', + ttl => 10, + type => 'AAAA', + }, + ], + }, + ], + }, ); for my $tc (@test_cases) {