generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ben Selwyn-Smith <[email protected]>
- Loading branch information
Showing
8 changed files
with
41 additions
and
36 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2023 - 2024, Oracle and/or its affiliates. All rights reserved. | ||
# Copyright (c) 2023 - 2025, Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. | ||
|
||
"""This script tests the functionality of the repo finder's remote API calls.""" | ||
|
@@ -12,8 +12,8 @@ | |
from macaron.config.defaults import defaults | ||
from macaron.repo_finder import repo_validator | ||
from macaron.repo_finder.repo_finder import find_repo | ||
from macaron.repo_finder.repo_finder_enums import RepoFinderOutcome | ||
from macaron.repo_finder.repo_finder_deps_dev import DepsDevRepoFinder | ||
from macaron.repo_finder.repo_finder_enums import RepoFinderOutcome | ||
from macaron.slsa_analyzer.git_url import clean_url | ||
|
||
logger: logging.Logger = logging.getLogger(__name__) | ||
|
@@ -80,7 +80,7 @@ def test_repo_finder() -> int: | |
|
||
# Test Java package whose SCM metadata only points to the repo in later versions than is provided here. | ||
purl = PackageURL.from_string("pkg:maven/io.vertx/[email protected]") | ||
repo = find_repo(purl) | ||
repo, _ = find_repo(purl) | ||
if repo == "https://github.com/eclipse-vertx/vertx-auth": | ||
return os.EX_UNAVAILABLE | ||
latest_purl, _ = DepsDevRepoFinder().get_latest_version(purl) | ||
|
@@ -90,7 +90,8 @@ def test_repo_finder() -> int: | |
return os.EX_UNAVAILABLE | ||
|
||
# Test Java package that has no version. | ||
if not find_repo(PackageURL.from_string("pkg:maven/io.vertx/vertx-auth-common")): | ||
match, outcome = find_repo(PackageURL.from_string("pkg:maven/io.vertx/vertx-auth-common")) | ||
if not match or outcome != RepoFinderOutcome.FOUND: | ||
return os.EX_UNAVAILABLE | ||
|
||
return os.EX_OK | ||
|
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