mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
wip pytest test david
This commit is contained in:
parent
75571e45ae
commit
bc550adce6
1 changed files with 26 additions and 7 deletions
|
@ -265,6 +265,7 @@ class TestDaemon(object):
|
|||
salt.utils.process.appendproctitle('{0}-{1}'.format(self.__class__.__name__, cls.__name__))
|
||||
daemon = cls(opts)
|
||||
getattr(daemon, start_fun)()
|
||||
multiprocessing.log_to_stderr(logging.DEBUG) ## DGM
|
||||
process = multiprocessing.Process(target=start,
|
||||
args=(cls, opts, start_fun))
|
||||
process.start()
|
||||
|
@ -303,7 +304,7 @@ class TestDaemon(object):
|
|||
' * {LIGHT_GREEN}Starting salt-master ... STARTED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
except (RuntimeWarning, RuntimeError):
|
||||
except (RuntimeWarning, RuntimeError) as exc:
|
||||
sys.stdout.write(
|
||||
'\r{0}\r'.format(
|
||||
' ' * getattr(self.parser.options, 'output_columns', PNUM)
|
||||
|
@ -312,6 +313,9 @@ class TestDaemon(object):
|
|||
sys.stdout.write(
|
||||
' * {LIGHT_RED}Starting salt-master ... FAILED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.write(
|
||||
'\nexception {0}'.format(exc)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
|
||||
try:
|
||||
|
@ -339,7 +343,7 @@ class TestDaemon(object):
|
|||
' * {LIGHT_GREEN}Starting salt-minion ... STARTED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
except (RuntimeWarning, RuntimeError):
|
||||
except (RuntimeWarning, RuntimeError) as exc:
|
||||
sys.stdout.write(
|
||||
'\r{0}\r'.format(
|
||||
' ' * getattr(self.parser.options, 'output_columns', PNUM)
|
||||
|
@ -348,6 +352,9 @@ class TestDaemon(object):
|
|||
sys.stdout.write(
|
||||
' * {LIGHT_RED}Starting salt-minion ... FAILED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.write(
|
||||
'\nexception {0}'.format(exc)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
|
||||
try:
|
||||
|
@ -375,7 +382,7 @@ class TestDaemon(object):
|
|||
' * {LIGHT_GREEN}Starting sub salt-minion ... STARTED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
except (RuntimeWarning, RuntimeError):
|
||||
except (RuntimeWarning, RuntimeError) as exc:
|
||||
sys.stdout.write(
|
||||
'\r{0}\r'.format(
|
||||
' ' * getattr(self.parser.options, 'output_columns', PNUM)
|
||||
|
@ -384,6 +391,9 @@ class TestDaemon(object):
|
|||
sys.stdout.write(
|
||||
' * {LIGHT_RED}Starting sub salt-minion ... FAILED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.write(
|
||||
'\nexception {0}'.format(exc)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
|
||||
try:
|
||||
|
@ -412,7 +422,7 @@ class TestDaemon(object):
|
|||
' * {LIGHT_GREEN}Starting syndic salt-master ... STARTED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
except (RuntimeWarning, RuntimeError):
|
||||
except (RuntimeWarning, RuntimeError) as exc:
|
||||
sys.stdout.write(
|
||||
'\r{0}\r'.format(
|
||||
' ' * getattr(self.parser.options, 'output_columns', PNUM)
|
||||
|
@ -421,6 +431,9 @@ class TestDaemon(object):
|
|||
sys.stdout.write(
|
||||
' * {LIGHT_RED}Starting syndic salt-master ... FAILED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.write(
|
||||
'\nexception {0}'.format(exc)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
|
||||
try:
|
||||
|
@ -448,7 +461,7 @@ class TestDaemon(object):
|
|||
' * {LIGHT_GREEN}Starting salt-syndic ... STARTED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
except (RuntimeWarning, RuntimeError):
|
||||
except (RuntimeWarning, RuntimeError) as exc:
|
||||
sys.stdout.write(
|
||||
'\r{0}\r'.format(
|
||||
' ' * getattr(self.parser.options, 'output_columns', PNUM)
|
||||
|
@ -457,6 +470,9 @@ class TestDaemon(object):
|
|||
sys.stdout.write(
|
||||
' * {LIGHT_RED}Starting salt-syndic ... FAILED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.write(
|
||||
'\nexception {0}'.format(exc)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
|
||||
if self.parser.options.proxy:
|
||||
|
@ -486,7 +502,7 @@ class TestDaemon(object):
|
|||
' * {LIGHT_GREEN}Starting salt-proxy ... STARTED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
except (RuntimeWarning, RuntimeError):
|
||||
except (RuntimeWarning, RuntimeError) as exc:
|
||||
sys.stdout.write(
|
||||
'\r{0}\r'.format(
|
||||
' ' * getattr(self.parser.options, 'output_columns', PNUM)
|
||||
|
@ -495,6 +511,9 @@ class TestDaemon(object):
|
|||
sys.stdout.write(
|
||||
' * {LIGHT_RED}Starting salt-proxy ... FAILED!\n{ENDC}'.format(**self.colors)
|
||||
)
|
||||
sys.stdout.write(
|
||||
'\nexception {0}'.format(exc)
|
||||
)
|
||||
sys.stdout.flush()
|
||||
|
||||
def start_raet_daemons(self):
|
||||
|
@ -1321,4 +1340,4 @@ class TestDaemon(object):
|
|||
break
|
||||
if time.time() - start >= timeout:
|
||||
raise RuntimeError("Ping Minions Failed")
|
||||
time.sleep(sleep)
|
||||
time.sleep(sleep)
|
Loading…
Add table
Reference in a new issue