From f3648fefe040152bb1676d651ebf7d836cb8ac9e Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Thu, 19 Feb 2026 00:01:18 +0100 Subject: Refactor: reduce duplication and tighten helpers - Remove redundant applicationUri log in print_application_description - Use UA_SECURITY_POLICY_NONE_URI macro instead of hardcoded string - Extract _s_register_with_lds / _s_deregister_from_lds helpers - Rename signal handler param 'sign' to 'sig' for consistency - Add INT_MIN/INT_MAX bounds check to config_require_int - Extract shared test helpers into tests/test_helpers.sh --- tests/test_helpers.sh | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tests/test_helpers.sh (limited to 'tests/test_helpers.sh') diff --git a/tests/test_helpers.sh b/tests/test_helpers.sh new file mode 100644 index 0000000..a9d420c --- /dev/null +++ b/tests/test_helpers.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# --------------------------------------------------------------- +# Shared helpers for OPC UA discovery integration tests. +# +# Source this file from test scripts: +# source "$(dirname "$0")/test_helpers.sh" +# --------------------------------------------------------------- + +FAILURES=0 + +# Waits up to 5 seconds for a process to listen on a TCP port. +# Exits immediately if the process dies before the port opens. +# +# wait_for_port