Compare commits

..

No commits in common. "be255b8da510051def2626c6b1e4b0c92a69980f" and "9895c56984518fe3701c42f231d175ad7f0efa7a" have entirely different histories.

5 changed files with 3 additions and 41 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
.vagrant/
__pycache__/

View File

@ -150,17 +150,12 @@ def test_test_incomplete(script_runner, script, config):
'one_minion_one_master',
'two_minions_one_master',
'one_minion_bootstrap',
'one_minion_one_master_bootstrap',
'one_minion_salt',
'two_minions_one_master_salt'
'one_minion_one_master_bootstrap'
])
def test_stop(script_runner, script, config, suite):
def test_stop(script_runner, script, virt, config, suite):
cmd = (script, '--config', config, '--suite', suite, '--stop', '--force')
result = script_runner.run(*cmd)
assert result.success
def test_stop_success(virt):
domains = []
for domain in virt.listDomainsID():
domains.append(virt.lookupByID(domain).name())

View File

@ -28,32 +28,3 @@ def test_salt(script_runner, script, config, suite):
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('suite,count', [
('one_minion_salt', 0),
('two_minions_one_master_salt', 1)
])
def test_salt_test(script_runner, script, config, suite, count):
cmd = (script, '--config', config, '--suite', suite)
result = script_runner.run(*cmd, '--debug', '--env', '--test')
assert result.success
for message in [
'Comment: File /srv/hello_world.txt updated',
'Succeeded: 1 (changed=1)',
'DEBUG - main_interactive: state.apply requested',
'INFO - main_interactive: Initiating tests ...',
'DEBUG - runtests: Test result is 0',
'DEBUG - runtests: Test succeeded'
]:
assert message in result.stderr
assert not any(term in result.stderr for term in [
'FAILED', 'WARNING - runtests: Tests failed',
'DEBUG - runtests: Test result is 1', 'AssertionError'
])
if count > 0:
minions = [0, 1]
else:
minions = [0]
for m in minions:
assert 'test_hello_world_content[paramiko://scullery-minion%i] PASSED' % m in result.stdout
assert script_runner.run(*cmd, '--stop')

View File

@ -56,7 +56,7 @@ test=bogus
[test.hello]
apply=hello_world
test=tests/salt/hello_world/tests/test_hello.py
test=salt/hello_world/tests/test_hello.py
[test.bogus]
apply=cashew

View File

@ -1,2 +0,0 @@
def test_hello_world_content(host):
assert host.file('/srv/hello_world.txt').content.decode('UTF-8') == 'Hello salted world!\n'