diff --git a/.codecov.yml b/.codecov.yml index 8a6d1ad5b046f..08907bbda4172 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -823,7 +823,7 @@ flags: ddev: carryforward: true paths: - - ddev/datadog_checks/ddev + - ddev/src/ddev - ddev/tests directory: carryforward: true diff --git a/ddev/src/ddev/cli/validate/ci.py b/ddev/src/ddev/cli/validate/ci.py index f464129d50fa5..3325428666a5b 100644 --- a/ddev/src/ddev/cli/validate/ci.py +++ b/ddev/src/ddev/cli/validate/ci.py @@ -31,10 +31,8 @@ def code_coverage_enabled(check_name, app): def get_coverage_sources(check_name, app): package_path = app.repo.integrations.get(check_name).package_directory - package_dir = package_path.relative_to(app.repo.path / check_name) - if check_name == 'ddev': - package_dir = 'datadog_checks/ddev' - return sorted([f'{check_name}/{package_dir}', f'{check_name}/tests']) + package_dir = package_path.relative_to(app.repo.path) + return sorted([str(package_dir.as_posix()), f'{check_name}/tests']) def sort_projects(projects): diff --git a/ddev/tests/cli/validate/test_ci.py b/ddev/tests/cli/validate/test_ci.py index a225c517a93b2..7f792adf0295c 100644 --- a/ddev/tests/cli/validate/test_ci.py +++ b/ddev/tests/cli/validate/test_ci.py @@ -145,13 +145,13 @@ def test_codecov_missing_flag(ddev, repository, helpers): assert error in helpers.remove_trailing_spaces(result.output) -# def test_valdiate_ci_success(ddev, repository, helpers): -# result = ddev('validate', 'ci') -# assert result.exit_code == 0, result.output -# assert helpers.remove_trailing_spaces(result.output) == helpers.dedent( -# """ -# CI configuration validation - -# Passed: 1 -# """ -# ) +def test_validate_ci_success(ddev, repository, helpers): + result = ddev('validate', 'ci') + assert result.exit_code == 0, result.output + assert helpers.remove_trailing_spaces(result.output) == helpers.dedent( + """ + CI configuration validation + + Passed: 1 + """ + )