pass
+@cli.command('show', help='View details of a Metric')
+@click.argument('name')
+@pass_context
+def show(ctx, name):
+ pass
+
+
@cli.command('run', help='Run tests to run Performance Metrics')
@click.argument('name')
@pass_context
pass
+@cli.command('show', help='View details of a Plan')
+@click.argument('name')
+@pass_context
+def show(ctx, name):
+ pass
+
+
@cli.command('run', help='Execute a Plan')
@click.argument('name')
@pass_context
pass
+@cli.command('show', help='View details of a QPI')
+@click.argument('name')
+@pass_context
+def show(ctx, name):
+ pass
+
+
@cli.command('run', help='Run performance tests for the specified QPI')
@click.argument('name')
@pass_context
from qtip.cli.entry import cli
-@pytest.fixture()
+@pytest.fixture(scope="module")
def runner():
return CliRunner()
result = runner.invoke(cli, ['metric', 'run'])
assert 'Missing argument "name".' in result.output
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['metric', 'show', 'fake-metric'])
+ assert result.output == ''
+
+ result = runner.invoke(cli, ['metric', 'show'])
+ assert 'Missing argument "name".' in result.output
from qtip.cli.entry import cli
-@pytest.fixture()
+@pytest.fixture(scope="module")
def runner():
return CliRunner()
result = runner.invoke(cli, ['plan', 'run'])
assert 'Missing argument "name".' in result.output
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['plan', 'show', 'fake-plan'])
+ assert result.output == ''
+
+ result = runner.invoke(cli, ['plan', 'show'])
+ assert 'Missing argument "name".' in result.output
from qtip.cli.entry import cli
-@pytest.fixture()
+@pytest.fixture(scope="module")
def runner():
return CliRunner()
result = runner.invoke(cli, ['qpi', 'run'])
assert 'Missing argument "name".' in result.output
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['qpi', 'show', 'fake-qpi'])
+ assert result.output == ''
+
+ result = runner.invoke(cli, ['qpi', 'show'])
+ assert 'Missing argument "name".' in result.output