Commit 14f218b0 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend/test: Request slaves early

caddy-frontend cluster stabilises only in case if slaves are present, as
otherwise slapos node instance won't run w/o errors, so request slaves
early.
parent eaa24281
...@@ -471,6 +471,23 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase): ...@@ -471,6 +471,23 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
# show full diffs, as it is required for proper analysis of problems # show full diffs, as it is required for proper analysis of problems
maxDiff = None maxDiff = None
@classmethod
def requestSlaves(cls):
request = cls.slap.request
for slave_reference, partition_parameter_kw in cls\
.getSlaveParameterDictDict().items():
request(
software_release=cls.getSoftwareURL(),
partition_reference=slave_reference,
partition_parameter_kw=partition_parameter_kw,
shared=True
)
@classmethod
def requestDefaultInstance(cls, *args, **kwargs):
super(HttpFrontendTestCase, cls).requestDefaultInstance(*args, **kwargs)
cls.requestSlaves()
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super(HttpFrontendTestCase, cls).setUpClass() super(HttpFrontendTestCase, cls).setUpClass()
...@@ -813,18 +830,10 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase): ...@@ -813,18 +830,10 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
@classmethod @classmethod
def setUpSlaves(cls): def setUpSlaves(cls):
cls.slave_connection_parameter_dict_dict = {} cls.slave_connection_parameter_dict_dict = {}
request = cls.slap.request
for slave_reference, partition_parameter_kw in cls\
.getSlaveParameterDictDict().items():
slave_instance = request(
software_release=cls.getSoftwareURL(),
partition_reference=slave_reference,
partition_parameter_kw=partition_parameter_kw,
shared=True
)
# run partition for slaves to be setup # run partition for slaves to be setup
cls.runComputerPartitionUntil( cls.runComputerPartitionUntil(
cls.untilSlavePartitionReady) cls.untilSlavePartitionReady)
request = cls.slap.request
for slave_reference, partition_parameter_kw in cls\ for slave_reference, partition_parameter_kw in cls\
.getSlaveParameterDictDict().items(): .getSlaveParameterDictDict().items():
slave_instance = request( slave_instance = request(
......
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