-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the codeowners validation in integrations-core (#17199)
- Loading branch information
1 parent
047d852
commit 65aa58e
Showing
6 changed files
with
66 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Allow the codeowners validation in integrations-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# (C) Datadog, Inc. 2024-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
from .conftest import write_file | ||
|
||
|
||
def test_codeowners_integrations_core(fake_repo, ddev): | ||
result = ddev('validate', 'codeowners') | ||
assert result.exit_code == 0, result.output | ||
|
||
|
||
def test_codeowners_valid(fake_extras_repo, ddev): | ||
result = ddev('-e', 'validate', 'codeowners') | ||
assert result.exit_code == 0, result.output | ||
|
||
|
||
def test_codeowners_invalid(fake_extras_repo, ddev): | ||
write_file( | ||
fake_extras_repo.path / '.github', | ||
'CODEOWNERS', | ||
""" | ||
/dummy/ @DataDog/agent-integrations | ||
""", | ||
) | ||
result = ddev('-e', 'validate', 'codeowners') | ||
assert result.exit_code == 1, result.output | ||
assert "Integration dummy2 does not have a valid `CODEOWNERS` entry." in result.output |