forked from containerbuildsystem/cachi2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a check for invalid path in get_repo_id function
closes containerbuildsystem#653 Signed-off-by: Michal Šoltis <[email protected]>
- Loading branch information
1 parent
7eddec2
commit eeacd2f
Showing
2 changed files
with
17 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,13 @@ def test_get_repo_id_no_origin(self, golang_repo_path: Path) -> None: | |
): | ||
get_repo_id(golang_repo_path) | ||
|
||
def test_get_repo_id_invalid_path(self, tmp_path: Path) -> None: | ||
with pytest.raises( | ||
UnsupportedFeature, | ||
match="Cachi2 cannot process provided path as a git repository", | ||
): | ||
get_repo_id(tmp_path) | ||
|
||
def test_as_vcs_url_qualifier(self) -> None: | ||
origin_url = "ssh://[email protected]/foo/bar.git" | ||
commit_id = "abcdef1234" | ||
|