tests/cli_tests/opcua_test_encrypted.bash
branchwxPython4
changeset 3718 7841b651d601
parent 3634 db3ea47b0d0b
child 3820 46f3ca3f0157
--- a/tests/cli_tests/opcua_test_encrypted.bash	Mon Jan 16 16:22:44 2023 +0100
+++ b/tests/cli_tests/opcua_test_encrypted.bash	Wed Feb 01 20:43:35 2023 +0100
@@ -22,12 +22,15 @@
 ) << EOF &
 
 import sys
+import os
 import time
 
 from opcua import ua, Server
 
 server = Server()
-server.set_endpoint("opc.tcp://127.0.0.1:4840/freeopcua/server/")
+host = os.environ.get("OPCUA_DEFAULT_HOST", "127.0.0.1")
+endpoint = "opc.tcp://"+host+":4840/freeopcua/server/"
+server.set_endpoint(endpoint)
 
 server.set_security_policy([ua.SecurityPolicyType.Basic256Sha256_SignAndEncrypt])
 server.load_certificate("my_cert.der")