Skip to content

Commit

Permalink
debug missing os
Browse files Browse the repository at this point in the history
  • Loading branch information
pn-santos committed Oct 31, 2024
1 parent 72ca564 commit 81d9807
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ func (s *TaskSuite) TestImageArgs() {
defer os.RemoveAll(imagesDir)

firstImage, err := random.Image(1024, 2)

configFile, err := firstImage.ConfigFile()
if err == nil {
fmt.Printf("OS: %s", configFile.OS)
} else {
fmt.Printf("Failed to obtain random.Image ConfigFile")
}

s.NoError(err)
firstPath := filepath.Join(imagesDir, "first.tar")
err = tarball.WriteToFile(firstPath, nil, firstImage)
Expand All @@ -341,6 +349,7 @@ func (s *TaskSuite) TestImageArgs() {
s.NoError(err)

s.req.Config.ContextDir = "testdata/image-args"
s.req.Config.ImagePlatform = "linux/amd64"
s.req.Config.AdditionalTargets = []string{"first"}
s.req.Config.ImageArgs = []string{
"first_image=" + firstPath,
Expand Down

0 comments on commit 81d9807

Please sign in to comment.