Skip to content

Commit

Permalink
test: add CBL-Mariner2.0 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
knqyf263 authored Feb 9, 2022
1 parent 1784746 commit 0f7a6d9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/rpmdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,23 @@ func TestRpmDB_Package(t *testing.T) {
},
wantInstalledFiles: CentOS8NodejsInstalledFiles,
},
{
name: "CBL-Mariner 2.0 curl",
pkgName: "curl",
file: "testdata/cbl-mariner-2.0/rpmdb.sqlite",
want: &PackageInfo{
Epoch: 0,
Name: "curl",
Version: "7.76.0",
Release: "6.cm2",
Arch: "x86_64",
Size: 326023,
SourceRpm: "curl-7.76.0-6.cm2.src.rpm",
License: "MIT",
Vendor: "Microsoft Corporation",
},
wantInstalledFiles: Mariner2CurlInstalledFiles,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
9 changes: 9 additions & 0 deletions pkg/rpmdb_testcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -3333,4 +3333,13 @@ var (
"/usr/share/systemtap/tapset",
"/usr/share/systemtap/tapset/node.stp",
}

Mariner2CurlInstalledFiles = []string{
"/usr/bin/curl",
"/usr/bin/curl-config",
"/usr/share/licenses/curl",
"/usr/share/licenses/curl/COPYING",
"/usr/share/man/man1/curl-config.1.gz",
"/usr/share/man/man1/curl.1.gz",
}
)
Binary file added pkg/testdata/cbl-mariner-2.0/rpmdb.sqlite
Binary file not shown.

0 comments on commit 0f7a6d9

Please sign in to comment.