mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
tests: replace Entry with DpkgMetadata name
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
parent
ada11973b2
commit
6fb3a876a8
1 changed files with 6 additions and 5 deletions
|
@ -5,10 +5,11 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/anchore/imgbom/imgbom/pkg"
|
||||
"github.com/go-test/deep"
|
||||
)
|
||||
|
||||
func compareEntries(t *testing.T, left, right Entry) {
|
||||
func compareEntries(t *testing.T, left, right pkg.DpkgMetadata) {
|
||||
t.Helper()
|
||||
if diff := deep.Equal(left, right); diff != nil {
|
||||
t.Error(diff)
|
||||
|
@ -18,11 +19,11 @@ func compareEntries(t *testing.T, left, right Entry) {
|
|||
func TestSinglePackage(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
expected Entry
|
||||
expected pkg.DpkgMetadata
|
||||
}{
|
||||
{
|
||||
name: "Test Single Package",
|
||||
expected: Entry{
|
||||
expected: pkg.DpkgMetadata{
|
||||
Package: "apt",
|
||||
Status: "install ok installed",
|
||||
Priority: "required",
|
||||
|
@ -73,11 +74,11 @@ func TestSinglePackage(t *testing.T) {
|
|||
func TestMultiplePackages(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
expected []Entry
|
||||
expected []pkg.DpkgMetadata
|
||||
}{
|
||||
{
|
||||
name: "Test Multiple Package",
|
||||
expected: []Entry{
|
||||
expected: []pkg.DpkgMetadata{
|
||||
{
|
||||
Package: "tzdata",
|
||||
Status: "install ok installed",
|
||||
|
|
Loading…
Reference in a new issue