From 2330543cc88a1efa840ea36923906497d4822c14 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 5 Aug 2024 19:57:18 -0400 Subject: [PATCH] dyndns2: Add comment explaining why keys are listed in test --- t/protocol_dyndns2.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/protocol_dyndns2.pl b/t/protocol_dyndns2.pl index 055d9dc..c0d407d 100644 --- a/t/protocol_dyndns2.pl +++ b/t/protocol_dyndns2.pl @@ -267,7 +267,9 @@ for my $tc (@test_cases) { local $ddclient::_l = $l; ddclient::nic_dyndns2_update(sort(keys(%{$tc->{cfg}}))); } - # These are the properties in %ddclient::config to check against $tc->{wantstatus}. + # These are the properties in %ddclient::config to check against $tc->{wantstatus}. Keys are + # explicitly listed here rather than read from $tc->{wantstatus} to ensure that entries that + # should not exist (e.g., wantipv4 and friends) are deleted (or never set). my %statuskeys = map(($_ => undef), qw(atime ip ipv4 ipv6 mtime status status-ipv4 status-ipv6 wantip wantipv4 wantipv6 wtime)); my %gotstatus;