-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For components in an SBOM that have no explicitly defined relationshi…
…ps we now set an implied relationship in analysis graph.
- Loading branch information
1 parent
66c20fd
commit 31d5465
Showing
4 changed files
with
200 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,6 +321,10 @@ mod test { | |
); | ||
assert_eq!( | ||
response["items"][0]["deps"][0]["purl"], | ||
"pkg:rpm/redhat/[email protected]?arch=src" | ||
); | ||
assert_eq!( | ||
response["items"][0]["deps"][1]["purl"], | ||
"pkg:rpm/redhat/[email protected]" | ||
); | ||
|
||
|
@@ -344,6 +348,10 @@ mod test { | |
); | ||
assert_eq!( | ||
response["items"][0]["deps"][0]["purl"], | ||
"pkg:rpm/redhat/[email protected]?arch=src" | ||
); | ||
assert_eq!( | ||
response["items"][0]["deps"][1]["purl"], | ||
"pkg:rpm/redhat/[email protected]" | ||
); | ||
|
||
|
@@ -429,7 +437,7 @@ mod test { | |
let uri = format!("/api/v1/analysis/root-component?q=sbom_id={}", sbom_id); | ||
let request: Request = TestRequest::get().uri(uri.clone().as_str()).to_request(); | ||
let response: Value = app.call_and_read_body_json(request).await; | ||
assert_eq!(&response["total"], 7); | ||
assert_eq!(&response["total"], 8); | ||
|
||
// negative test | ||
let uri = "/api/v1/analysis/root-component?q=sbom_id=urn:uuid:99999999-9999-9999-9999-999999999999"; | ||
|
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
Oops, something went wrong.