Skip to content

Commit

Permalink
set default value from host runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
coopernetes committed Oct 14, 2023
1 parent a84621a commit 99c3ec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/container-structure-test/app/cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io/ioutil"

"os"

"runtime"
"github.com/GoogleContainerTools/container-structure-test/cmd/container-structure-test/app/cmd/test"
v1 "github.com/opencontainers/image-spec/specs-go/v1"

Expand Down Expand Up @@ -227,7 +227,7 @@ func AddTestFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&opts.Driver, "driver", "d", "docker", "driver to use when running tests")
cmd.Flags().StringVar(&opts.Metadata, "metadata", "", "path to image metadata file")
cmd.Flags().StringVar(&opts.Runtime, "runtime", "", "runtime to use with docker driver")
cmd.Flags().StringVar(&opts.Platform, "platform", "linux/amd64", "Set platform if host is multi-platform capable")
cmd.Flags().StringVar(&opts.Platform, "platform", fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), "Set platform if host is multi-platform capable")
cmd.Flags().BoolVar(&opts.Pull, "pull", false, "force a pull of the image before running tests")
cmd.MarkFlagsMutuallyExclusive("image-from-oci-layout", "pull")
cmd.Flags().BoolVar(&opts.Save, "save", false, "preserve created containers after test run")
Expand Down

0 comments on commit 99c3ec0

Please sign in to comment.