Add unit test for this specific case of loading from V1 archive

Added a tgz "frobnitz.v1.tgz" of the testdata folder frobnitz.v1
Verified that without the fix the unit test fails and re-produces
the issue.

Signed-off-by: Sidharth Surana <ssurana@vmware.com>
pull/6678/head
Sidharth Surana 5 years ago
parent 8f833fed25
commit 31d41d3fd1

@ -58,6 +58,19 @@ func TestLoadV1(t *testing.T) {
verifyDependenciesLock(t, c) verifyDependenciesLock(t, c)
} }
func TestLoadFileV1(t *testing.T) {
l, err := Loader("testdata/frobnitz.v1.tgz")
if err != nil {
t.Fatalf("Failed to load testdata: %s", err)
}
c, err := l.Load()
if err != nil {
t.Fatalf("Failed to load testdata: %s", err)
}
verifyDependencies(t, c)
verifyDependenciesLock(t, c)
}
func TestLoadFile(t *testing.T) { func TestLoadFile(t *testing.T) {
l, err := Loader("testdata/frobnitz-1.2.3.tgz") l, err := Loader("testdata/frobnitz-1.2.3.tgz")
if err != nil { if err != nil {

Binary file not shown.
Loading…
Cancel
Save