Consolidate test_salt
- Run test tests together with state apply test Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
43db99bfaa
commit
4d20916a96
@ -13,21 +13,6 @@ Testing functions for Scullery - a SaltStack testing tool.
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
|
||||||
@pytest.mark.parametrize('suite', [
|
|
||||||
'one_minion_salt',
|
|
||||||
'two_minions_one_master_salt',
|
|
||||||
])
|
|
||||||
def test_salt(script_runner, script, config, suite):
|
|
||||||
cmd = (script, '--config', config, '--suite', suite)
|
|
||||||
result = script_runner.run(*cmd, '--debug', '--env', '--test')
|
|
||||||
# not possible until we have a way to apply without invoking tests
|
|
||||||
# assert result.success
|
|
||||||
assert 'Comment: File /srv/hello_world.txt updated' in result.stderr
|
|
||||||
assert 'Succeeded: 1 (changed=1)' in result.stderr
|
|
||||||
assert 'DEBUG - main_interactive: state.apply requested' in result.stderr
|
|
||||||
assert script_runner.run(*cmd, '--stop')
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
||||||
@pytest.mark.parametrize('suite,count', [
|
@pytest.mark.parametrize('suite,count', [
|
||||||
('one_minion_salt', 0),
|
('one_minion_salt', 0),
|
||||||
@ -38,8 +23,8 @@ def test_salt_test(script_runner, script, config, suite, count):
|
|||||||
result = script_runner.run(*cmd, '--debug', '--env', '--test')
|
result = script_runner.run(*cmd, '--debug', '--env', '--test')
|
||||||
assert result.success
|
assert result.success
|
||||||
for message in [
|
for message in [
|
||||||
'Comment: File /srv/hello_world.txt updated',
|
'File /srv/hello_world.txt',
|
||||||
'Succeeded: 1 (changed=1)',
|
'Succeeded: 1',
|
||||||
'DEBUG - main_interactive: state.apply requested',
|
'DEBUG - main_interactive: state.apply requested',
|
||||||
'INFO - main_interactive: Initiating tests ...',
|
'INFO - main_interactive: Initiating tests ...',
|
||||||
'DEBUG - runtests: Test result is 0',
|
'DEBUG - runtests: Test result is 0',
|
||||||
|
Loading…
Reference in New Issue
Block a user