Commit e1702f76 authored by Ivan Tyagov's avatar Ivan Tyagov

Read OPC UA server address from SlapOs master.

parent e3264250
...@@ -12,4 +12,4 @@ md5sum = cbaa8e36097f36caf1a377fa71341a09 ...@@ -12,4 +12,4 @@ md5sum = cbaa8e36097f36caf1a377fa71341a09
[test_beremiz.py] [test_beremiz.py]
filename = test_beremiz.py filename = test_beremiz.py
md5sum = 24e8c47c3b8cb869619e2f89992fef23 md5sum = 4dd4c5439aea98979f97caf27307c999
...@@ -111,6 +111,8 @@ class BeremizTest(EndToEndTestCase): ...@@ -111,6 +111,8 @@ class BeremizTest(EndToEndTestCase):
partition_parameter_kw=parameter_dict) partition_parameter_kw=parameter_dict)
cls.waitUntilGreen(instance_name) cls.waitUntilGreen(instance_name)
connection_dict = cls.getInstanceInfos(instance_name).connection_dict connection_dict = cls.getInstanceInfos(instance_name).connection_dict
print(connection_dict)
cls.coupler_url_ipv6 = connection_dict.get("url-ipv6")
# supply / request beremiz-runtime # supply / request beremiz-runtime
instance_name = time.strftime('e2e-test-beremiz-runtime-%Y-%B-%d-%H:%M:%S') instance_name = time.strftime('e2e-test-beremiz-runtime-%Y-%B-%d-%H:%M:%S')
...@@ -124,7 +126,7 @@ class BeremizTest(EndToEndTestCase): ...@@ -124,7 +126,7 @@ class BeremizTest(EndToEndTestCase):
print(connection_dict) print(connection_dict)
def test_plc_increment_run(self): def test_plc_increment_run(self):
NUMBER_OF_CHECKS = 100 NUMBER_OF_CHECKS = 10
TIMEOUT = 2 TIMEOUT = 2
OPC_UA_ADDRESS = "opc.tcp://0.0.0.0:4840/" OPC_UA_ADDRESS = "opc.tcp://0.0.0.0:4840/"
OPC_UA_IDENTIFIER = "ns=1;s=i2c0.relay0" OPC_UA_IDENTIFIER = "ns=1;s=i2c0.relay0"
...@@ -133,7 +135,7 @@ class BeremizTest(EndToEndTestCase): ...@@ -133,7 +135,7 @@ class BeremizTest(EndToEndTestCase):
time.sleep(30) time.sleep(30)
# connect to a session at OPC-UA server # connect to a session at OPC-UA server
client = Client(OPC_UA_ADDRESS) client = Client(self.coupler_url_ipv6)
# for now this is the only test thus we start it without a wrapper # for now this is the only test thus we start it without a wrapper
test_count = 1 test_count = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment