mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
update to latest packageurl-go (#3347)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -112,7 +112,7 @@ func Test_PackageURL(t *testing.T) {
|
||||
ID: "alpine",
|
||||
VersionID: "3.4.6",
|
||||
},
|
||||
expected: "pkg:apk/alpine/p@v?arch=a&upstream=origin&distro=alpine-3.4.6",
|
||||
expected: "pkg:apk/alpine/p@v?arch=a&distro=alpine-3.4.6&upstream=origin",
|
||||
},
|
||||
{
|
||||
name: "wolfi distro",
|
||||
|
||||
@@ -108,7 +108,7 @@ func Test_PackageURL(t *testing.T) {
|
||||
ID: "arch",
|
||||
BuildID: "rolling",
|
||||
},
|
||||
expected: "pkg:alpm/arch/p@v?arch=a&upstream=origin&distro=arch-rolling",
|
||||
expected: "pkg:alpm/arch/p@v?arch=a&distro=arch-rolling&upstream=origin",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ func Test_packageURL(t *testing.T) {
|
||||
Source: "s",
|
||||
Version: "v",
|
||||
},
|
||||
expected: "pkg:deb/debian/p@v?upstream=s&distro=debian-11",
|
||||
expected: "pkg:deb/debian/p@v?distro=debian-11&upstream=s",
|
||||
},
|
||||
{
|
||||
name: "with upstream qualifier with source pkg name and version info",
|
||||
@@ -98,7 +98,7 @@ func Test_packageURL(t *testing.T) {
|
||||
Version: "v",
|
||||
SourceVersion: "2.3",
|
||||
},
|
||||
expected: "pkg:deb/debian/p@v?upstream=s%402.3&distro=debian-11",
|
||||
expected: "pkg:deb/debian/p@v?distro=debian-11&upstream=s%402.3",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ func Test_packageURL(t *testing.T) {
|
||||
Release: "r",
|
||||
Epoch: intRef(1),
|
||||
},
|
||||
expected: "pkg:rpm/centos/p@v-r?arch=a&epoch=1&distro=centos-7",
|
||||
expected: "pkg:rpm/centos/p@v-r?arch=a&distro=centos-7&epoch=1",
|
||||
},
|
||||
{
|
||||
name: "missing distro",
|
||||
@@ -67,7 +67,7 @@ func Test_packageURL(t *testing.T) {
|
||||
Release: "r",
|
||||
SourceRpm: "sourcerpm",
|
||||
},
|
||||
expected: "pkg:rpm/redhat/p@v-r?upstream=sourcerpm&distro=rhel-8.4",
|
||||
expected: "pkg:rpm/redhat/p@v-r?distro=rhel-8.4&upstream=sourcerpm",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ func TestLanguageFromPURL(t *testing.T) {
|
||||
want: Lua,
|
||||
},
|
||||
{
|
||||
purl: "pkg:opam/ocaml-base-compiler@ 5.2.0",
|
||||
purl: "pkg:opam/ocaml-base-compiler@5.2.0",
|
||||
want: OCaml,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user