Skip to content

Commit

Permalink
Add a --debug (-d) flag to ddev env test
Browse files Browse the repository at this point in the history
This gets passed to the main test command and has the same behaviour
as that for `ddev test`.
  • Loading branch information
alopezz committed Jun 17, 2022
1 parent de95835 commit 230a6bb
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions datadog_checks_dev/datadog_checks/dev/tooling/commands/env/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,23 @@
@click.option('--ddtrace', is_flag=True, help='Run tests using dd-trace-py')
@click.option('--filter', '-k', 'test_filter', help='Only run tests matching given substring expression')
@click.option('--changed', is_flag=True, help='Only test changed checks')
@click.option('--debug', '-d', is_flag=True, help='Set the log level to debug')
@click.pass_context
def test(
ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memory, junit, ddtrace, test_filter, changed
ctx,
checks,
agent,
python,
dev,
base,
env_vars,
new_env,
profile_memory,
junit,
ddtrace,
test_filter,
changed,
debug,
):
"""Test an environment."""
check_envs = get_test_envs(checks, e2e_tests_only=True, changed_only=changed)
Expand Down Expand Up @@ -104,7 +118,7 @@ def test(
ctx.invoke(
test_command,
checks=[f'{check}:{env}'],
debug=DEBUG_OUTPUT,
debug=debug or DEBUG_OUTPUT,
e2e=True,
passenv=' '.join(persisted_env_vars) if persisted_env_vars else None,
junit=junit,
Expand Down

0 comments on commit 230a6bb

Please sign in to comment.