Commit cfeb5039 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Thomas Gambier

caddy-frontend/test: Improve untilSlavePartitionReady

It is ready when all on-watch processes are not EXITED.
parent c559e35e
......@@ -736,6 +736,14 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
@classmethod
def untilSlavePartitionReady(cls):
# all on-watch services shall not be exited
for process in cls.getSupervisorRPCServer()\
.supervisor.getAllProcessInfo():
if process['name'].endswith('-on-watch') and \
process['statename'] == 'EXITED':
if process['name'].startswith('monitor-http'):
continue
return False
for slave_reference, partition_parameter_kw in cls\
.getSlaveParameterDictDict().items():
parameter_dict = cls.slapos_controler.slap.registerOpenOrder().request(
......@@ -768,10 +776,6 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
# run partition for slaves to be setup
cls.runComputerPartitionUntil(
cls.untilSlavePartitionReady)
# run once more slapos node instance, as kedifa-updater sets up
# certificates needed for caddy-frontend, and on this moment it can be
# not started yet
cls.runComputerPartition(max_quantity=1)
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