From 644f0577144d88cdf56256f799ec405fe0153fb0 Mon Sep 17 00:00:00 2001 From: Wynne Pirini Date: Thu, 15 Oct 2026 16:12:51 +1300 Subject: [PATCH 1/2] packaging(ns8): poll for the route instead of checking it once Found by running the suite against a real cluster for the first time. The 'works as expected' test curled the host route immediately after configure-module returned, but Traefik registers the route asynchronously a few seconds later, so the request hit Traefik before the route existed: curl: (22) The requested URL returned error: 404 It reproduced on two consecutive runs and on a freshly built cluster, so it was not a one-off. Measured on the cluster: the route is live and answering 302 within about 5s of configure, and /admin/ returns 200, so the module itself is fine. The test was asserting on Traefik's registration latency. Wrap the check in Wait Until Keyword Succeeds (60x5s). Polling rather than a fixed sleep keeps the suite fast when the route is already up, and still tolerates a slow node. Suite now passes 4/4 against a live single-node NS8 9 cluster. --- packaging/ns8/tests/10__calnode.robot | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packaging/ns8/tests/10__calnode.robot b/packaging/ns8/tests/10__calnode.robot index 08672200..fb27be7f 100644 --- a/packaging/ns8/tests/10__calnode.robot +++ b/packaging/ns8/tests/10__calnode.robot @@ -5,6 +5,12 @@ Library SSHLibrary ${TEST_HOST} calnode.example.test ${module_id} ${EMPTY} +*** Keywords *** +The route responds + ${rc} = Execute Command curl -f -H 'Host: ${TEST_HOST}' http://127.0.0.1/ + ... return_rc=True return_stdout=False + Should Be Equal As Integers ${rc} 0 + *** Test Cases *** Check if ns8-calnode is installed correctly ${output} ${rc} = Execute Command add-module ${IMAGE_URL} 1 @@ -19,7 +25,9 @@ Check if ns8-calnode can be configured Should Be Equal As Integers ${rc} 0 Check if ns8-calnode works as expected - # Host-based route: pass the hostname explicitly since it does not resolve here - ${rc} = Execute Command curl -f -H 'Host: ${TEST_HOST}' http://127.0.0.1/ - ... return_rc=True return_stdout=False - Should Be Equal As Integers ${rc} 0 \ No newline at end of file + # Host-based route: pass the hostname explicitly since it does not resolve here. + # configure-module returns as soon as the module is configured, but Traefik + # registers the route asynchronously a few seconds later. Polling here rather + # than sleeping a fixed amount keeps the test fast when the route is already + # up, and stops it flaking with "curl: (22) 404" on a slow node. + Wait Until Keyword Succeeds 60x 5s The route responds \ No newline at end of file From 3dfbbeba625ec7682a08d8434236df4cae4f7fc1 Mon Sep 17 00:00:00 2001 From: Wynne Pirini Date: Thu, 15 Oct 2026 18:30:29 +1300 Subject: [PATCH 2/2] packaging(ns8): record the first live robot run in the README The suite has now actually executed against a single-node NS8 cluster (Rocky 9.8, ns8-core@ns8-stable): 4/4 without the browser and 5/5 with RUN_UI_TESTS=true. Corrects the earlier claim that it had never been run. --- packaging/ns8/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packaging/ns8/README.md b/packaging/ns8/README.md index ee70894f..8ed8de3b 100644 --- a/packaging/ns8/README.md +++ b/packaging/ns8/README.md @@ -116,9 +116,10 @@ after restoring, the app served 200, logged "keyvault: DEK unwrapped from keystore", the encryption-key fingerprint was unchanged, and an event type created before the backup was still there. -The `tests/` robot suite is wired up and dry-run clean (5/5, Robot 7.5), but it -has still never been executed against a live cluster. Every live check above -was done by hand. See [Testing](#testing). +The `tests/` robot suite has now been run against a live cluster: 4/4 without +the browser and 5/5 with `RUN_UI_TESTS=true`, on a single-node NS8 built from +`ns8-core@ns8-stable` on Rocky 9.8. Running it is what turned up the +route-registration race described in [Testing](#testing). ## Uninstall