Re-order stop tests

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-05-21 05:42:38 +02:00
parent 0d7a6f9428
commit 8bc3173bbf
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -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')