From a136ba4cdc89226327671ce1d2c0afe17bdaa667 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 18 Aug 2024 00:26:49 -0400 Subject: [PATCH] tests: Fix `ssl` option for `dnsexit2` protocol tests The `ssl` option is a global option, not a per-host option. This commit could instead do: local $ddclient::globals{ssl} = 0; but it's more straightforward to include `http://` in the `server` option, and it tests that `server` supports the inclusion of the scheme. --- t/protocol_dnsexit2.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/t/protocol_dnsexit2.pl b/t/protocol_dnsexit2.pl index b32c688..dd24b1d 100644 --- a/t/protocol_dnsexit2.pl +++ b/t/protocol_dnsexit2.pl @@ -66,7 +66,6 @@ sub get_requests { subtest 'Testing nic_dnsexit2_update' => sub { my %config = ( 'host.my.zone.com' => { - 'ssl' => 'no', 'verbose' => 'yes', 'usev4' => 'ipv4', 'wantipv4' => '8.8.4.4', @@ -75,7 +74,7 @@ subtest 'Testing nic_dnsexit2_update' => sub { 'protocol' => 'dnsexit2', 'password' => 'mytestingpassword', 'zone' => 'my.zone.com', - 'server' => $httpd->host_port(), + 'server' => $httpd->endpoint(), 'path' => '/update', 'ttl' => 5 }); @@ -111,13 +110,12 @@ subtest 'Testing nic_dnsexit2_update' => sub { subtest 'Testing nic_dnsexit2_update without a zone set' => sub { my %config = ( 'myhost.zone.com' => { - 'ssl' => 'yes', 'verbose' => 'yes', 'usev4' => 'ipv4', 'wantipv4' => '8.8.4.4', 'protocol' => 'dnsexit2', 'password' => 'anotherpassword', - 'server' => $httpd->host_port(), + 'server' => $httpd->endpoint(), 'path' => '/update-alt', 'ttl' => 10 }); @@ -143,24 +141,22 @@ subtest 'Testing nic_dnsexit2_update without a zone set' => sub { subtest 'Testing nic_dnsexit2_update with two hostnames, one with a zone and one without' => sub { my %config = ( 'host1.zone.com' => { - 'ssl' => 'yes', 'verbose' => 'yes', 'usev4' => 'ipv4', 'wantipv4' => '8.8.4.4', 'protocol' => 'dnsexit2', 'password' => 'testingpassword', - 'server' => $httpd->host_port(), + 'server' => $httpd->endpoint(), 'path' => '/update', 'ttl' => 5 }, 'host2.zone.com' => { - 'ssl' => 'yes', 'verbose' => 'yes', 'usev6' => 'ipv6', 'wantipv6' => '2001:4860:4860::8888', 'protocol' => 'dnsexit2', 'password' => 'testingpassword', - 'server' => $httpd->host_port(), + 'server' => $httpd->endpoint(), 'path' => '/update', 'ttl' => 10, 'zone' => 'zone.com'