Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Kozaczuk <[email protected]>
  • Loading branch information
wkozaczuk committed May 23, 2023
1 parent 68fc0e5 commit 6bb7574
Show file tree
Hide file tree
Showing 8 changed files with 1,147 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func ComposePackage(repo *util.Repo, extraDependencies []string, imageSize int64
if !updatePackage || !imageExists {
zfsBuilderPath, err = repo.GetZfsBuilderImagePath()
if err != nil {
return fmt.Errorf("Failed to find ZFS builder path.\nError was: %s", appName, err)
return fmt.Errorf("Failed to find ZFS builder path.\nError was: %s", err)
}
// Initialize an empty image based on the provided loader image. imageSize is used to
// determine the size of the user partition. Use default loader image.
Expand Down
4 changes: 2 additions & 2 deletions cmd/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (*suite) TestComposeWithNoManifestSucceeds(c *C) {
imageSize, _ := util.ParseMemSize("64M")
appName := "test-corrupt-app"

err := ComposePackage(repo, []string{}, imageSize, false, false, true, tmp, appName, &BootOptions{}, "rofs", "")
err := ComposePackage(repo, []string{}, imageSize, false, false, true, tmp, appName, &BootOptions{}, "rofs", "osv-loader")

c.Assert(err, IsNil)
}
Expand All @@ -239,7 +239,7 @@ func (*suite) TestComposeCorruptPackageFails(c *C) {
imageSize, _ := util.ParseMemSize("64M")
appName := "test-corrupt-app"

err = ComposePackage(repo, []string{}, imageSize, false, false, false, tmp, appName, &BootOptions{}, "zfs", "")
err = ComposePackage(repo, []string{}, imageSize, false, false, false, tmp, appName, &BootOptions{}, "zfs", "osv-loader")
c.Assert(err, NotNil)
}

Expand Down
4 changes: 2 additions & 2 deletions util/github_releases_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func (s *suite) TestGithubPackageInfoRemote(c *C) {
}

func (s *suite) TestGithubDownloadLoaderImage(c *C) {
s.repo.ReleaseTag = "v0.51.0"
loaderName, err := s.repo.DownloadLoaderImage("qemu")
s.repo.ReleaseTag = "v0.57.0"
loaderName, err := s.repo.DownloadLoaderImage("osv-loader", "qemu")
c.Assert(err, IsNil)
c.Check(loaderName, Equals, "osv-loader")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: osv.httpserver-html5-gui
title: OSv HTML5 GUI (frontend)
author: Waldek Kozaczuk
version: 0.53.0
require:
- osv.httpserver-api
created: 2019-03-26T11:47:43Z
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: osv.bootstrap
title: OSv Bootstrap
author: Anonymous
version: 0.54.0
created: "2019-09-16T07:52:38-04:00"
platform: Ubuntu 19.04

Large diffs are not rendered by default.

1,128 changes: 1,128 additions & 0 deletions util/testdata/github/repos/cloudius-systems/osv/releases/tags/v0.57.0/payload

Large diffs are not rendered by default.

0 comments on commit 6bb7574

Please sign in to comment.