Commit graph

8 commits

Author SHA1 Message Date
Richard Hansen
9c7c0e55c1 tests: Refine module loads
* Wrap all conditional loads in `BEGIN {}` to be closer to the
    behavior of `use`.
  * Add missing `Test::Warnings`, `HTTP::Request` loads.
  * Sort by module name, except load `Test::More` first and
    `Test::Warnings` immediately after to maximize checking
    effectiveness.
  * Return truthy from `eval` block to prevent the `or` case from
    executing if the loaded module does not have a final truthy
    statement.  (Except for `ddclient` because we want to test that it
    does have a final truthy statement.)
2024-09-06 18:41:33 -04:00
Richard Hansen
2ccdd3b19e tests: Delete obsolete debugging comments
All log output goes to stderr, so turning on `debug` or `verbose` will
not interfere with TAP.  A better way to debug is to add the following
to whatever scope you think is appropriate:

    local $ddclient::globals{debug} = 1;
    local $ddclient::globals{verbose} = 1;
2024-09-06 15:22:55 -04:00
Richard Hansen
fa0bfde3cb Don't assume the default interface has a globally routable IP 2024-07-11 00:18:27 -04:00
Richard Hansen
6af76afde9 Use skip_all if test precondition is not met
Subtests can't have zero checks.
2024-07-11 00:18:27 -04:00
Richard Hansen
01d2db06c1 Invert conditions for readability 2024-07-11 00:18:27 -04:00
Richard Hansen
6e7a4fb460 Split subtest into two subtests
This makes it easier to debug failures.
2024-07-11 00:18:27 -04:00
David Kerr
1b2f45cc59 Add get_default_interface 2020-09-21 15:16:48 -04:00
David Kerr
213cf6ad09 Add get_ip_from_interface function 2020-09-21 15:16:11 -04:00