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.
This commit is contained in:
Richard Hansen 2024-08-18 00:26:49 -04:00
parent 598dee50ca
commit a136ba4cdc

View file

@ -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'