Commit a4681260 authored by Benjamin Blanc's avatar Benjamin Blanc

dummy slapos master answers are working

parent a63dac9b
...@@ -64,7 +64,7 @@ class ScalabilityTestRunner(): ...@@ -64,7 +64,7 @@ class ScalabilityTestRunner():
# Protection to prevent installation of softwares after checking # Protection to prevent installation of softwares after checking
self.authorize_supply = True self.authorize_supply = True
# Used to simulate SlapOS answer # Used to simulate SlapOS answer (used as a queue)
self.last_slapos_answer = [] self.last_slapos_answer = []
def _prepareSlapOS(self, software_path, computer_guid, create_partition=0): def _prepareSlapOS(self, software_path, computer_guid, create_partition=0):
...@@ -101,9 +101,11 @@ class ScalabilityTestRunner(): ...@@ -101,9 +101,11 @@ class ScalabilityTestRunner():
self.testnode.log("Dummy SlapOS Master answer received.") self.testnode.log("Dummy SlapOS Master answer received.")
self.last_slapos_answer.append(True) self.last_slapos_answer.append(True)
def _prepareDummySlapOSAnswer(self): def _prepareDummySlapOSAnswer(self):
print "Dummy slapOS answer enabled, press crtl+c to simulate SlapOS (positive) answer."
signal.signal(signal.SIGINT, self._getSignal) signal.signal(signal.SIGINT, self._getSignal)
def _comeBackFromDummySlapOS(self): def _comeBackFromDummySlapOS(self):
signal.signal(signal.SIGINT, signal.SIG_IGN) print "Dummy slapOS answer disabled, don't press crtl+c anymore."
signal.signal(signal.SIGINT, signal.SIG_DFL)
def simulateSlapOSAnswer(self): def simulateSlapOSAnswer(self):
if len(self.last_slapos_answer)==0: if len(self.last_slapos_answer)==0:
return False return False
......
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