Re-order stop tests
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
0d7a6f9428
commit
8bc3173bbf
@ -110,24 +110,6 @@ def test_launch_stop(script_runner, script, virt, config, suite):
|
||||
assert not any('scullery' in domain for domain in domains)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
||||
@pytest.mark.parametrize('suite', [
|
||||
'one_minion',
|
||||
'two_minions',
|
||||
'one_master',
|
||||
'one_minion_one_master',
|
||||
'two_minions_one_master'
|
||||
])
|
||||
def test_stop(script_runner, script, virt, config, suite):
|
||||
cmd = (script, '--config', config, '--suite', suite, '--stop')
|
||||
result = script_runner.run(*cmd)
|
||||
assert result.success
|
||||
domains = []
|
||||
for domain in virt.listDomainsID():
|
||||
domains.append(virt.lookupByID(domain).name())
|
||||
assert not any('scullery' in domain for domain in domains)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
||||
@pytest.mark.parametrize('suite,masters,minions', [
|
||||
('one_minion', None, 'scullery-minion0'),
|
||||
@ -150,3 +132,35 @@ def test_envfile(script_runner, script, config, suite, masters, minions):
|
||||
script_runner.run(*cmd, '--stop')
|
||||
assert os.path.isfile(envfile) is False
|
||||
|
||||
|
||||
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
||||
@pytest.mark.parametrize('suite', [
|
||||
'one_minion',
|
||||
'two_minions',
|
||||
'one_master',
|
||||
'one_minion_one_master',
|
||||
'two_minions_one_master'
|
||||
])
|
||||
def test_stop(script_runner, script, virt, config, suite):
|
||||
cmd = (script, '--config', config, '--suite', suite, '--stop')
|
||||
result = script_runner.run(*cmd)
|
||||
assert result.success
|
||||
domains = []
|
||||
for domain in virt.listDomainsID():
|
||||
domains.append(virt.lookupByID(domain).name())
|
||||
assert not any('scullery' in domain for domain in domains)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('config', ['complete'], indirect=True)
|
||||
@pytest.mark.parametrize('suite', [
|
||||
'one_minion',
|
||||
'two_minions',
|
||||
'one_master',
|
||||
'one_minion_one_master',
|
||||
'two_minions_one_master'
|
||||
])
|
||||
def test_already_stopped(script_runner, script, virt, config, suite):
|
||||
cmd = (script, '--config', config, '--suite', suite, '--stop', '--debug')
|
||||
result = script_runner.run(*cmd)
|
||||
assert result.success
|
||||
assert result.stderr.endswith('DEBUG - main_interactive: Deployment is not running\n')
|
||||
|
Loading…
Reference in New Issue
Block a user