From f2b8d8d514eed86bc48c42c04ab160d6743540fa Mon Sep 17 00:00:00 2001 From: Jessica Gamio <52049720+jessicagamio@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:07:43 -0700 Subject: [PATCH] ci: moved unittest config to Gitlab (#10513) - Removed unittest from config.templ.yaml file in circleCI - Added unittest to the contrib.yml file in Gitlab ## Checklist - [X] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: Jessica Gamio --- .circleci/config.templ.yml | 7 --- .gitlab/tests/contrib.yml | 5 +++ riotfile.py | 3 ++ .../unittest/test_unittest_snapshot.py | 44 ++++++++++++++----- ...unittest_generates_coverage_correctly.json | 10 ++--- ...rates_coverage_correctly_with_skipped.json | 10 ++--- ...t_unittest_generates_source_file_data.json | 12 ++--- ..._force_run_multiple_unskippable_tests.json | 12 ++--- ...test_will_force_run_unskippable_tests.json | 10 ++--- ...st_unittest_will_include_custom_tests.json | 10 ++--- ....test_unittest_will_include_lines_pct.json | 8 ++-- ...ort_coverage_by_test_with_itr_skipped.json | 10 ++--- ...age_by_test_with_itr_skipped_multiple.json | 10 ++--- ...t_will_skip_invalid_unskippable_tests.json | 14 +++--- ...ip_unskippable_test_if_skip_decorator.json | 14 +++--- 15 files changed, 101 insertions(+), 78 deletions(-) diff --git a/.circleci/config.templ.yml b/.circleci/config.templ.yml index cf9c0fa4961..761e9845f7e 100644 --- a/.circleci/config.templ.yml +++ b/.circleci/config.templ.yml @@ -830,13 +830,6 @@ jobs: env: 'pytest_plugin_v2' snapshot: true - unittest: - <<: *machine_executor - steps: - - run_test: - pattern: 'unittest' - snapshot: true - asynctest: executor: ddtrace_dev steps: diff --git a/.gitlab/tests/contrib.yml b/.gitlab/tests/contrib.yml index 118b4aff699..7ca9bae3186 100644 --- a/.gitlab/tests/contrib.yml +++ b/.gitlab/tests/contrib.yml @@ -185,6 +185,11 @@ tornado: variables: SUITE_NAME: "tornado" +unittest: + extends: .test_base_riot_snapshot + variables: + SUITE_NAME: "unittest" + wsgi: extends: .test_base_riot_snapshot variables: diff --git a/riotfile.py b/riotfile.py index ee4ba7e7def..0826502cc0a 100644 --- a/riotfile.py +++ b/riotfile.py @@ -1646,6 +1646,9 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION): env={ "DD_PATCH_MODULES": "unittest:true", "DD_AGENT_PORT": "9126", + # gitlab sets the service name to the repo name while locally the default service name is used + # setting DD_SERVICE ensures the output of the snapshot tests is consistent. + "DD_UNITTEST_SERVICE": "dd-trace-py", }, pys=select_pys(), ), diff --git a/tests/contrib/unittest/test_unittest_snapshot.py b/tests/contrib/unittest/test_unittest_snapshot.py index 75242f05af7..5176c508cf1 100644 --- a/tests/contrib/unittest/test_unittest_snapshot.py +++ b/tests/contrib/unittest/test_unittest_snapshot.py @@ -30,6 +30,28 @@ SNAPSHOT_IGNORES_ITR_COVERAGE = ["metrics.test.source.start", "metrics.test.source.end", "meta.test.source.file"] +SNAPSHOT_IGNORES_GITLAB = [ + "meta._dd.ci.env_vars", + "meta.ci.job.name", + "meta.ci.job.url", + "meta.ci.node.labels", + "meta.ci.node.name", + "meta.ci.pipeline.id", + "meta.ci.pipeline.name", + "meta.ci.pipeline.number", + "meta.ci.pipeline.url", + "meta.ci.provider.name", + "meta.ci.stage.name", + "meta.ci.workspace_path", + "meta.git.branch", + "meta.git.commit.author.date", + "meta.git.commit.author.email", + "meta.git.commit.author.name", + "meta.git.commit.message", + "meta.git.commit.sha", + "meta.git.repository_url", +] + class UnittestSnapshotTestCase(TracerTestCase): @pytest.fixture(autouse=True) @@ -38,7 +60,7 @@ def fixtures(self, testdir, monkeypatch, git_repo): self.monkeypatch = monkeypatch self.git_repo = git_repo - @snapshot(ignores=SNAPSHOT_IGNORES) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_GITLAB) def test_unittest_generates_source_file_data(self): ret_false = """ def ret_false(): @@ -71,7 +93,7 @@ def test_third(self): ["ddtrace-run", "python", "-m", "unittest"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True ) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_generates_coverage_correctly(self): ret_false = """ def ret_false(): @@ -108,7 +130,7 @@ def test_second(self): ["ddtrace-run", "python", "-m", "unittest"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True ) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_generates_coverage_correctly_with_skipped(self): ret_false = """ def ret_false(): @@ -144,7 +166,7 @@ def test_second(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_report_coverage_by_test_with_itr_skipped(self): ret_false = """ def ret_false(): @@ -193,7 +215,7 @@ def test_second(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_report_coverage_by_test_with_itr_skipped_multiple(self): ret_false = """ def ret_false(): @@ -242,7 +264,7 @@ def test_second(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_force_run_unskippable_tests(self): ret_false = """ def ret_false(): @@ -282,7 +304,7 @@ def test_second(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_force_run_multiple_unskippable_tests(self): ret_false = """ def ret_false(): @@ -326,7 +348,7 @@ def test_third(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_skip_invalid_unskippable_tests(self): ret_false = """ def ret_false(): @@ -375,7 +397,7 @@ def test_fourth(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_skip_unskippable_test_if_skip_decorator(self): ret_false = """ def ret_false(): @@ -428,7 +450,7 @@ def test_fourth(self): with override_env(dict(DD_API_KEY="foobar.baz", DD_CIVISIBILITY_ITR_ENABLED="1")): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_include_custom_tests(self): ret_false = """ def ret_false(): @@ -474,7 +496,7 @@ def test_second(self): ): subprocess.run(["ddtrace-run", "python", "-m", "unittest"]) - @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE) + @snapshot(ignores=SNAPSHOT_IGNORES + SNAPSHOT_IGNORES_ITR_COVERAGE + SNAPSHOT_IGNORES_GITLAB) def test_unittest_will_include_lines_pct(self): tools = """ def add_two_number_list(list_1, list_2): diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly.json index 376a5b5bb85..fb7daaa9eb1 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -45,7 +45,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -89,7 +89,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -133,7 +133,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -183,7 +183,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly_with_skipped.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly_with_skipped.json index c423a9872d0..3286a368cb3 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly_with_skipped.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_coverage_correctly_with_skipped.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -45,7 +45,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -89,7 +89,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -133,7 +133,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -183,7 +183,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_source_file_data.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_source_file_data.json index 4b7488d5e29..a6d3018d86b 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_source_file_data.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_generates_source_file_data.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -45,7 +45,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_source_file", "trace_id": 0, "span_id": 2, @@ -89,7 +89,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -133,7 +133,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_first", "trace_id": 0, "span_id": 4, @@ -182,7 +182,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, @@ -231,7 +231,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_third", "trace_id": 0, "span_id": 6, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_multiple_unskippable_tests.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_multiple_unskippable_tests.json index bcb78718909..060a165015f 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_multiple_unskippable_tests.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_multiple_unskippable_tests.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -51,7 +51,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -101,7 +101,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -145,7 +145,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -197,7 +197,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, @@ -249,7 +249,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_third", "trace_id": 0, "span_id": 6, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_unskippable_tests.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_unskippable_tests.json index 2ce274a5ca8..1f26a812932 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_unskippable_tests.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_force_run_unskippable_tests.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -51,7 +51,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -101,7 +101,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -145,7 +145,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -197,7 +197,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_custom_tests.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_custom_tests.json index 2165b6afc17..c78ee088ccd 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_custom_tests.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_custom_tests.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -52,7 +52,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -103,7 +103,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -148,7 +148,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -201,7 +201,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_lines_pct.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_lines_pct.json index 343192ec62f..054684b339a 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_lines_pct.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_include_lines_pct.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -46,7 +46,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_tools", "trace_id": 0, "span_id": 2, @@ -90,7 +90,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CodeCoverageTestCase", "trace_id": 0, "span_id": 3, @@ -134,7 +134,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CodeCoverageTestCase.test_add_two_number_list", "trace_id": 0, "span_id": 4, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped.json index 9ab920e8194..cc10918a886 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -51,7 +51,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -101,7 +101,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -145,7 +145,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -197,7 +197,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped_multiple.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped_multiple.json index 61f41ca42bc..15456827f47 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped_multiple.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_report_coverage_by_test_with_itr_skipped_multiple.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -51,7 +51,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -101,7 +101,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -145,7 +145,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -197,7 +197,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 5, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_invalid_unskippable_tests.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_invalid_unskippable_tests.json index f47038e32b7..ce7dbde623d 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_invalid_unskippable_tests.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_invalid_unskippable_tests.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -51,7 +51,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -101,7 +101,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -145,7 +145,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -195,7 +195,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_fourth", "trace_id": 0, "span_id": 5, @@ -245,7 +245,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 6, @@ -295,7 +295,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_third", "trace_id": 0, "span_id": 7, diff --git a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_unskippable_test_if_skip_decorator.json b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_unskippable_test_if_skip_decorator.json index 85a95765386..d6ee799d9ee 100644 --- a/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_unskippable_test_if_skip_decorator.json +++ b/tests/snapshots/tests.contrib.unittest.test_unittest_snapshot.test_unittest_will_skip_unskippable_test_if_skip_decorator.json @@ -1,7 +1,7 @@ [[ { "name": "unittest.test_session", - "service": "unittest", + "service": "dd-trace-py", "resource": "python -m unittest", "trace_id": 0, "span_id": 1, @@ -51,7 +51,7 @@ }, { "name": "unittest.test_module", - "service": "unittest", + "service": "dd-trace-py", "resource": "test_my_coverage", "trace_id": 0, "span_id": 2, @@ -101,7 +101,7 @@ }, { "name": "unittest.test_suite", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase", "trace_id": 0, "span_id": 3, @@ -145,7 +145,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_cov", "trace_id": 0, "span_id": 4, @@ -196,7 +196,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_fourth", "trace_id": 0, "span_id": 5, @@ -247,7 +247,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_second", "trace_id": 0, "span_id": 6, @@ -298,7 +298,7 @@ }, { "name": "unittest.test", - "service": "unittest", + "service": "dd-trace-py", "resource": "CoverageTestCase.test_third", "trace_id": 0, "span_id": 7,