mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
tests.runtests: add minion test runner
This commit is contained in:
parent
3b3106c0cd
commit
f671c3bf3b
@ -129,6 +129,14 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help='Run salt/renderers/*.py tests'
|
help='Run salt/renderers/*.py tests'
|
||||||
)
|
)
|
||||||
|
self.test_selection_group.add_option(
|
||||||
|
'--minion',
|
||||||
|
'--minion-tests',
|
||||||
|
dest='minion',
|
||||||
|
default=False,
|
||||||
|
action='store_true',
|
||||||
|
help='Run tests for minion'
|
||||||
|
)
|
||||||
self.test_selection_group.add_option(
|
self.test_selection_group.add_option(
|
||||||
'-l',
|
'-l',
|
||||||
'--loader',
|
'--loader',
|
||||||
@ -218,6 +226,7 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
self.options.fileserver,
|
self.options.fileserver,
|
||||||
self.options.wheel,
|
self.options.wheel,
|
||||||
self.options.api,
|
self.options.api,
|
||||||
|
self.options.minion,
|
||||||
os.geteuid() != 0,
|
os.geteuid() != 0,
|
||||||
not self.options.run_destructive)):
|
not self.options.run_destructive)):
|
||||||
self.error(
|
self.error(
|
||||||
@ -233,7 +242,7 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
self.options.runners, self.options.loader, self.options.name,
|
self.options.runners, self.options.loader, self.options.name,
|
||||||
self.options.outputter, self.options.cloud_provider_tests,
|
self.options.outputter, self.options.cloud_provider_tests,
|
||||||
self.options.fileserver, self.options.wheel, self.options.api,
|
self.options.fileserver, self.options.wheel, self.options.api,
|
||||||
self.options.renderers)):
|
self.options.renderers, self.options.minion)):
|
||||||
self.options.module = True
|
self.options.module = True
|
||||||
self.options.cli = True
|
self.options.cli = True
|
||||||
self.options.client = True
|
self.options.client = True
|
||||||
@ -247,6 +256,7 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
self.options.fileserver = True
|
self.options.fileserver = True
|
||||||
self.options.wheel = True
|
self.options.wheel = True
|
||||||
self.options.api = True
|
self.options.api = True
|
||||||
|
self.options.minion = True
|
||||||
|
|
||||||
self.start_coverage(
|
self.start_coverage(
|
||||||
branch=True,
|
branch=True,
|
||||||
@ -370,6 +380,7 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
self.options.wheel or
|
self.options.wheel or
|
||||||
self.options.cloud_provider_tests or
|
self.options.cloud_provider_tests or
|
||||||
self.options.api or
|
self.options.api or
|
||||||
|
self.options.minion or
|
||||||
named_tests):
|
named_tests):
|
||||||
# We're either not running any of runners, state, module and client
|
# We're either not running any of runners, state, module and client
|
||||||
# tests, or, we're only running unittests by passing --unit or by
|
# tests, or, we're only running unittests by passing --unit or by
|
||||||
@ -392,7 +403,7 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
self.options.runners, self.options.shell, self.options.state,
|
self.options.runners, self.options.shell, self.options.state,
|
||||||
self.options.loader, self.options.outputter, self.options.name,
|
self.options.loader, self.options.outputter, self.options.name,
|
||||||
self.options.cloud_provider_tests, self.options.api, self.options.renderers,
|
self.options.cloud_provider_tests, self.options.api, self.options.renderers,
|
||||||
self.options.fileserver, self.options.wheel]):
|
self.options.fileserver, self.options.wheel, self.options.minion]):
|
||||||
return status
|
return status
|
||||||
|
|
||||||
with TestDaemon(self):
|
with TestDaemon(self):
|
||||||
@ -428,6 +439,8 @@ class SaltTestsuiteParser(SaltCoverageTestingParser):
|
|||||||
status.append(self.run_integration_suite('netapi', 'NetAPI'))
|
status.append(self.run_integration_suite('netapi', 'NetAPI'))
|
||||||
if self.options.renderers:
|
if self.options.renderers:
|
||||||
status.append(self.run_integration_suite('renderers', 'Renderers'))
|
status.append(self.run_integration_suite('renderers', 'Renderers'))
|
||||||
|
if self.options.minion:
|
||||||
|
status.append(self.run_integration_suite('minion', 'Minion'))
|
||||||
return status
|
return status
|
||||||
|
|
||||||
def run_unit_tests(self):
|
def run_unit_tests(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user