-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app)!: Migrate configs to use settings service (#716)
- Loading branch information
1 parent
9481d6a
commit 00df363
Showing
6 changed files
with
124 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,17 +195,32 @@ def test_parse_git_url(url: str, expected: GitUrl): | |
@pytest.mark.parametrize( | ||
"url", | ||
[ | ||
"git+ssh://[email protected]/tracecat-dev/[email protected]", | ||
"git+ssh://[email protected]/tracecat-dev/[email protected]", | ||
# Adding invalid cases from old test | ||
"https://github.com/org/repo", | ||
"git+ssh://[email protected]/org", | ||
"git+ssh://[email protected]/org/repo@branch/extra", | ||
pytest.param( | ||
"git+ssh://[email protected]/tracecat-dev/[email protected]", | ||
id="Invalid host domain tracecat.com", | ||
), | ||
pytest.param( | ||
"git+ssh://[email protected]/tracecat-dev/[email protected]", | ||
id="Invalid host domain git.com", | ||
), | ||
pytest.param( | ||
"https://github.com/org/repo", | ||
id="Invalid URL scheme - must be git+ssh", | ||
), | ||
pytest.param( | ||
"git+ssh://[email protected]/org", | ||
id="Missing repository name", | ||
), | ||
pytest.param( | ||
"git+ssh://[email protected]/org/repo@branch/extra", | ||
id="Invalid branch format with extra path component", | ||
), | ||
], | ||
) | ||
def test_parse_git_url_invalid(url: str): | ||
allowed_domains = {"github.com", "gitlab.com"} | ||
with pytest.raises(ValueError): | ||
parse_git_url(url) | ||
parse_git_url(url, allowed_domains=allowed_domains) | ||
|
||
|
||
def test_construct_template_action(): | ||
|
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
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