diff --git a/tests/test_cli.py b/tests/01_test_cli.py similarity index 87% rename from tests/test_cli.py rename to tests/01_test_cli.py index 32be7ea..188da1b 100644 --- a/tests/test_cli.py +++ b/tests/01_test_cli.py @@ -121,6 +121,27 @@ def test_envfile(script_runner, script, config, suite, masters, minions): assert os.path.isfile(envfile) is False +@pytest.mark.parametrize('config', ['complete'], indirect=True) +def test_test_undeclared(script_runner, script, config): + result = script_runner.run(script, '--config', config, '--suite', 'one_minion', '--test') + assert not result.success + assert result.stderr.endswith('Tests requested but not declared in suite configuration\n') + + +@pytest.mark.parametrize('config', ['complete'], indirect=True) +def test_test_undefined(script_runner, script, config): + result = script_runner.run(script, '--config', config, '--suite', 'one_minion_bogus_test', '--test') + assert not result.success + assert result.stderr.endswith('Specified test is not defined\n') + + +@pytest.mark.parametrize('config', ['complete'], indirect=True) +def test_test_incomplete(script_runner, script, config): + result = script_runner.run(script, '--config', config, '--suite', 'one_minion_bogus_test_2', '--test') + assert not result.success + assert result.stderr.endswith('Incomplete test configuration\n') + + @pytest.mark.parametrize('config', ['complete'], indirect=True) @pytest.mark.parametrize('suite', [ 'one_minion', diff --git a/tests/test_vagrant.py b/tests/02_test_vagrant.py similarity index 100% rename from tests/test_vagrant.py rename to tests/02_test_vagrant.py