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