Skip to content

Commit

Permalink
rpmtest: add module member
Browse files Browse the repository at this point in the history
This doesn't exist (yet) on the data returned by the container catalog
API.

Signed-off-by: Hank Donnay <[email protected]>
Signed-off-by: vishnuchalla <[email protected]>
  • Loading branch information
hdonnay authored and vishnuchalla committed Jul 5, 2023
1 parent b6040d7 commit 590856b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/rpmtest/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type ManifestRPM struct {
Arch string `json:"architecture"`
Source string `json:"srpm_nevra"`
GPG string `json:"gpg"`
Module string `json:"module"`
}

func PackagesFromRPMManifest(t *testing.T, r io.Reader) []*claircore.Package {
Expand All @@ -40,6 +41,7 @@ func PackagesFromRPMManifest(t *testing.T, r io.Reader) []*claircore.Package {
Kind: "binary",
Arch: rpm.Arch,
RepositoryHint: "key:" + rpm.GPG,
Module: rpm.Module,
}
if s, ok := src[rpm.Source]; ok {
p.Source = s
Expand All @@ -57,6 +59,7 @@ func PackagesFromRPMManifest(t *testing.T, r io.Reader) []*claircore.Package {
Kind: "source",
Name: s[:pos],
Version: strings.TrimPrefix(s[pos+1:], "0:"),
Module: rpm.Module,
})
src[rpm.Source] = &srcs[idx]
p.Source = &srcs[idx]
Expand Down

0 comments on commit 590856b

Please sign in to comment.