From 11e0663a8e992b1e218de55b82918cdeced0f1c4 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Thu, 9 Sep 2021 10:22:47 -0400 Subject: [PATCH] Allow the use of ddtrace for E2E tests --- .../datadog_checks/dev/tooling/commands/env/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/env/test.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/env/test.py index d83b7636ea9cc..959b2469c4d37 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/env/test.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/env/test.py @@ -43,10 +43,11 @@ @click.option('--new-env', '-ne', is_flag=True, help='Execute setup and tear down actions') @click.option('--profile-memory', '-pm', is_flag=True, help='Whether to collect metrics about memory usage') @click.option('--junit', '-j', 'junit', is_flag=True, help='Generate junit reports') +@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.pass_context -def test(ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memory, junit, test_filter, changed): +def test(ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memory, junit, ddtrace, test_filter, changed): """Test an environment.""" check_envs = get_tox_envs(checks, e2e_tests_only=True, changed_only=changed) tests_ran = False @@ -105,6 +106,7 @@ def test(ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memor e2e=True, passenv=' '.join(persisted_env_vars) if persisted_env_vars else None, junit=junit, + ddtrace=ddtrace, test_filter=test_filter, latest=env == 'latest', )