tests: update all tests to pass the IDLike value

Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
Alfredo Deza 2020-11-10 12:40:50 -05:00
parent 10b55311df
commit 6ae3b47959
5 changed files with 8 additions and 6 deletions

View File

@ -62,7 +62,7 @@ func TestCycloneDxDirsPresenter(t *testing.T) {
t.Fatal(err)
}
d, err := distro.NewDistro(distro.Ubuntu, "20.04")
d, err := distro.NewDistro(distro.Ubuntu, "20.04", "debian")
if err != nil {
t.Fatal(err)
}
@ -152,7 +152,7 @@ func TestCycloneDxImgsPresenter(t *testing.T) {
t.Fatal(err)
}
d, err := distro.NewDistro(distro.RedHat, "8")
d, err := distro.NewDistro(distro.RedHat, "8", "")
if err != nil {
t.Fatal(err)
}

View File

@ -29,6 +29,7 @@
},
"distro": {
"name": "",
"version": ""
"version": "",
"idLike": ""
}
}

View File

@ -59,6 +59,7 @@
},
"distro": {
"name": "",
"version": ""
"version": "",
"idLike": ""
}
}

View File

@ -24,7 +24,7 @@ func TestDistroImage(t *testing.T) {
t.Fatalf("could not find distro")
}
expected, err := distro.NewDistro(distro.Busybox, "1.31.1")
expected, err := distro.NewDistro(distro.Busybox, "1.31.1", "")
if err != nil {
t.Fatalf("could not create distro: %+v", err)
}

View File

@ -62,7 +62,7 @@ func testJsonSchema(t *testing.T, catalog *pkg.Catalog, theScope *scope.Scope, p
output := bytes.NewBufferString("")
d, err := distro.NewDistro(distro.CentOS, "5")
d, err := distro.NewDistro(distro.CentOS, "5", "rhel fedora")
if err != nil {
t.Fatalf("bad distro: %+v", err)
}