Commit c3416add authored by Ivan Tyagov's avatar Ivan Tyagov

Code refactor.

parent 186d27ae
...@@ -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 =348ea49d561c84dd42f24ff4830b45c2 md5sum = b926baa2a7f733bc7301cf14e5017689
...@@ -97,23 +97,24 @@ class EndToEndTestCase(unittest.TestCase): ...@@ -97,23 +97,24 @@ class EndToEndTestCase(unittest.TestCase):
class BeremizTest(EndToEndTestCase): class BeremizTest(EndToEndTestCase):
# XXX: move outside runner at Test Suite ?
computer_id = "COMP-3523"
coupler_release = "https://lab.nexedi.com/nexedi/slapos/raw/master/software/osie-coupler/software-dev.cfg"
runtime_release = "https://lab.nexedi.com/nexedi/slapos/raw/master/software/beremiz-runtime/software.cfg"
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super().setUpClass() super().setUpClass()
# supply needed software releases # supply needed software releases
coupler_release = "https://lab.nexedi.com/nexedi/slapos/raw/master/software/osie-coupler/software-dev.cfg" cls.supply(self.coupler_release, self.computer_id, state="available")
runtime_release = "https://lab.nexedi.com/nexedi/slapos/raw/master/software/beremiz-runtime/software.cfg" cls.supply(self.runtime_release, self.computer_id, state="available")
# wait for release? where to keep computer _id ?
cls.supply(coupler_release, "COMP-3523", state="available")
cls.supply(runtime_release, "COMP-3523", state="available")
# supply / request coupler # supply / request coupler
instance_name = time.strftime('e2e-test-coupler-%Y-%B-%d-%H:%M:%S') instance_name = time.strftime('e2e-test-coupler-%Y-%B-%d-%H:%M:%S')
parameter_dict = {"mode":1, parameter_dict = {"mode":1,
"network_interface": "192.168.0.0"} "network_interface": "192.168.0.0"}
cls.request(coupler_release, cls.request(self.coupler_release,
instance_name, instance_name,
partition_parameter_kw=parameter_dict) partition_parameter_kw=parameter_dict)
cls.waitUntilGreen(instance_name, 180) cls.waitUntilGreen(instance_name, 180)
...@@ -124,7 +125,7 @@ class BeremizTest(EndToEndTestCase): ...@@ -124,7 +125,7 @@ class BeremizTest(EndToEndTestCase):
# 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')
parameter_dict = {"runtime_plc_url": "https://lab.nexedi.com/nexedi/osie/raw/master/Beremiz/beremiz_test_opc_ua/bin/beremiz_test_opc_ua.tgz"} parameter_dict = {"runtime_plc_url": "https://lab.nexedi.com/nexedi/osie/raw/master/Beremiz/beremiz_test_opc_ua/bin/beremiz_test_opc_ua.tgz"}
cls.request(runtime_release, cls.request(self.runtime_release,
instance_name, instance_name,
partition_parameter_kw=parameter_dict) partition_parameter_kw=parameter_dict)
cls.waitUntilGreen(instance_name, 180) cls.waitUntilGreen(instance_name, 180)
......
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