-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log error but return nil to ensure deps.dev continues if package is n…
…ot found (#2416) * log error but return nil to ensure deps.dev continues if package is not found Signed-off-by: pxp928 <[email protected]> * add unit test for invalid package and esure it does not error but just log the error Signed-off-by: pxp928 <[email protected]> * move error logging from private function and add comments on why we are logging the error Signed-off-by: pxp928 <[email protected]> --------- Signed-off-by: pxp928 <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ func Test_depsCollector_GetX(t *testing.T) { | |
{ | ||
name: "invalid packages", | ||
packages: []string{"not-a-package"}, | ||
wantErr: true, | ||
wantErr: false, | ||
}, | ||
{ | ||
name: "org.webjars.npm:a maven package", | ||
|
@@ -380,6 +380,10 @@ func Test_depsCollector_GetDependenciesEq(t *testing.T) { | |
name: "multiple different packages", | ||
packages: []string{"pkg:cargo/[email protected]", "pkg:npm/[email protected]"}, | ||
}, | ||
{ | ||
name: "deb package - invalid", | ||
packages: []string{"pkg:deb/org.webjars.npm/[email protected]"}, | ||
}, | ||
} | ||
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
|