Skip to content

Commit

Permalink
Update ddev validate ci testing (#15511)
Browse files Browse the repository at this point in the history
* update validate ci testing

* i mispelled validate :P

* fix coverage path

* fix

---------

Co-authored-by: Ofek Lev <[email protected]>
  • Loading branch information
swang392 and ofek authored Aug 8, 2023
1 parent 018d9a9 commit e408aa1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ flags:
ddev:
carryforward: true
paths:
- ddev/datadog_checks/ddev
- ddev/src/ddev
- ddev/tests
directory:
carryforward: true
Expand Down
6 changes: 2 additions & 4 deletions ddev/src/ddev/cli/validate/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
20 changes: 10 additions & 10 deletions ddev/tests/cli/validate/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
)

0 comments on commit e408aa1

Please sign in to comment.