Skip to content

Commit

Permalink
update lock test
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmistman committed Jan 18, 2024
1 parent 7cc34bc commit db20f53
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test-suite/Lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func TestLock(t *testing.T) {
}

func doLock(bt testUtils.BackendT) {
// test absence of lock file
for _, tmpl := range standardTemplates {
template := bt.Backend.Name + "/" + tmpl + "/"

Expand Down Expand Up @@ -57,4 +58,29 @@ func doLock(bt testUtils.BackendT) {
}
})
}

// test absence of package dir
bt.Subtest(bt.Backend.Name + "/no-package-dir", func(bt testUtils.BackendT) {
bt.AddTestFile(bt.Backend.Name+"/many-deps/"+bt.Backend.Specfile, bt.Backend.Specfile)

specDeps := bt.UpmListSpecFile()

bt.UpmLock()

lockDeps := bt.UpmListLockFile()

for _, specDep := range specDeps {
found := false
for _, lockDep := range lockDeps {
if specDep.Name == lockDep.Name {
found = true
break
}
}

if !found {
bt.Fail("expected %s in lock file", specDep.Name)
}
}
})
}

0 comments on commit db20f53

Please sign in to comment.