Skip to content

Commit

Permalink
test(rpmdb): add empty file test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaritan committed Mar 6, 2023
1 parent 436475b commit a4581e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Empty file.
9 changes: 9 additions & 0 deletions pkg/lockfile/rpmdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ func TestParseRpmDB_SQLite_FileDoesNotExist(t *testing.T) {
expectPackages(t, packages, []lockfile.PackageDetails{})
}

func TestParseRpmDB_SQLite_EmptyFile(t *testing.T) {
t.Parallel()

packages, err := lockfile.ParseRpmDB("fixtures/rpm/empty-rpmdb")

expectErrContaining(t, err, "could not open")
expectPackages(t, packages, []lockfile.PackageDetails{})
}

func TestParseRpmDB_SQLite_NotAnRpmDb(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit a4581e8

Please sign in to comment.