From 83cbb3b6fb4ec21631953ba070f7d5d999bcde07 Mon Sep 17 00:00:00 2001 From: Ochenstarik Date: Sun, 9 Aug 2026 17:50:58 +0700 Subject: [PATCH] test(helper): cover missing node row --- tests/bootstrap/test-bootstrap-contract.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bootstrap/test-bootstrap-contract.sh b/tests/bootstrap/test-bootstrap-contract.sh index 93f56a3..6d0c8fc 100755 --- a/tests/bootstrap/test-bootstrap-contract.sh +++ b/tests/bootstrap/test-bootstrap-contract.sh @@ -151,6 +151,15 @@ else fi [[ "$(<"$list_error")" == 'mesh.node-not-activated' ]] printf 'source\t10.77.0.2\tkey-source\tactive\n' >"$inactive_state" +if SMM_POLICY_TESTING=1 SMM_POLICY_STATE_FILE="$inactive_state" \ + bash "$helper" link-connect source target tcp 22 10 >/dev/null 2>"$list_error"; then + printf '%s\n' "policy helper unexpectedly activated a Link to a missing Node" >&2 + exit 1 +else + [[ $? -eq 80 ]] +fi +[[ "$(<"$list_error")" == 'mesh.node-not-activated' ]] +printf 'source\t10.77.0.2\tkey-source\tactive\n' >"$inactive_state" printf 'target\t\tkey-target\tactive\n' >>"$inactive_state" if SMM_POLICY_TESTING=1 SMM_POLICY_STATE_FILE="$inactive_state" \ bash "$helper" link-connect source target tcp 22 10 >/dev/null 2>"$list_error"; then