Commit graph

19 commits

Author SHA1 Message Date
Richard Hansen
63bf3512a4 dnsexit2: Update multiple hosts at a time when possible 2025-01-10 19:20:25 -05:00
Richard Hansen
3b10e37607 tests: dnsexit2: Add test for host outside of zone 2025-01-10 19:20:25 -05:00
Richard Hansen
b31e5e2f91 tests: dnsexit2: Add test for two hosts in the same zone 2025-01-09 19:33:57 -05:00
Richard Hansen
3b73350541 tests: dnsexit2 Convert tests to table-driven
This makes the tests easier to read and extend.
2025-01-09 19:33:57 -05:00
Richard Hansen
8cf322e162 tests: Only skip HTTPD tests if dependencies are unavailable
This prevents the tests from passing due to syntax errors in
the ddclient::t::HTTPD module.
2025-01-08 18:24:04 -05:00
Richard Hansen
5ed43a2e4c tests: Factor out duplicate HTTP server code 2024-09-06 18:44:19 -04:00
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
dd7ad1ccf4 tests: dnsexit2: Use reserved IP addresses and domain names 2024-09-06 15:47:05 -04:00
Richard Hansen
d38fcbddb8 tests: dnsexit2: Rename variables to follow got, want pattern 2024-09-06 15:47:05 -04:00
Richard Hansen
d0eb899fc8 tests: dnsexit2: Localize changes to %config 2024-09-06 15:47:05 -04:00
Richard Hansen
e8d79d842c tests: dnsexit2: Inline unnecessary helper function
for readability
2024-09-06 15:47:05 -04:00
Richard Hansen
7653f60058 tests: dnsexit2: Move request to a variable
for readability
2024-09-06 15:46:59 -04:00
Richard Hansen
c768f1350b tests: dnsexit2: Check number of requests 2024-09-06 15:24:16 -04:00
Richard Hansen
e9029b85d5 tests: dnsexit2: Simplify request check 2024-09-06 15:22:55 -04:00
Richard Hansen
bd1e42ac6c tests: dnsexit2: Declare @requests where used
for readability
2024-09-06 15:22:55 -04:00
Richard Hansen
1e3bebc60d Object-oriented protocol definitions
This improves readability and will make it easier to refactor to fix
issues or add features.
2024-09-02 03:55:09 -04:00
Richard Hansen
0c094f6ee8 tests: Fix verbose option for dnsexit2 protocol tests
The `verbose` option is a global option, not a per-host option.
2024-08-18 00:35:44 -04:00
Richard Hansen
a136ba4cdc 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.
2024-08-18 00:35:44 -04:00
Richard Hansen
eb281ea47b dnsexit2: Rename test file for consistency 2024-08-03 03:32:35 -04:00
Renamed from t/dnsexit2.pl (Browse further)