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):
# show full diffs, as it is required for proper analysis of problems
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
def setUpClass(cls):
super(HttpFrontendTestCase, cls).setUpClass()
......@@ -813,18 +830,10 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
@classmethod
def setUpSlaves(cls):
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
cls.runComputerPartitionUntil(
cls.untilSlavePartitionReady)
request = cls.slap.request
for slave_reference, partition_parameter_kw in cls\
.getSlaveParameterDictDict().items():
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