diff --git a/cmd/pack/main.go b/cmd/pack/main.go index d0ea377e20..22ec46b849 100644 --- a/cmd/pack/main.go +++ b/cmd/pack/main.go @@ -28,7 +28,6 @@ func main() { logger.Error(err.Error()) os.Exit(1) } - rootCmd := &cobra.Command{ Use: "pack", PersistentPreRun: func(cmd *cobra.Command, args []string) { diff --git a/internal/commands/report_test.go b/internal/commands/report_test.go index d5656a800a..53789f129f 100644 --- a/internal/commands/report_test.go +++ b/internal/commands/report_test.go @@ -40,7 +40,10 @@ func testReportCommand(t *testing.T, when spec.G, it spec.S) { packHome, err = ioutil.TempDir("", "") h.AssertNil(t, err) packConfigPath = filepath.Join(packHome, "config.toml") - h.AssertNil(t, ioutil.WriteFile(packConfigPath, []byte(`default-builder-image = "some/image"`), 0666)) + h.AssertNil(t, ioutil.WriteFile(packConfigPath, []byte(` +default-builder-image = "some/image" +experimental = true +`), 0666)) packMissingHome, err = ioutil.TempDir("", "") h.AssertNil(t, err) }) @@ -63,6 +66,7 @@ func testReportCommand(t *testing.T, when spec.G, it spec.S) { it("presents output", func() { h.AssertNil(t, command.Execute()) h.AssertContains(t, outBuf.String(), `default-builder-image = "some/image"`) + h.AssertContains(t, outBuf.String(), `experimental = true`) }) }) when("config.toml is not present", func() { diff --git a/internal/config/config.go b/internal/config/config.go index 86c8478d37..de5d91de5c 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -11,6 +11,7 @@ import ( type Config struct { RunImages []RunImage `toml:"run-images"` DefaultBuilder string `toml:"default-builder-image,omitempty"` + Experimental bool `toml:"experimental,omitempty"` } type RunImage struct { diff --git a/internal/config/config_test.go b/internal/config/config_test.go index d2ff6356fa..4180057eec 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -46,6 +46,7 @@ func testConfig(t *testing.T, when spec.G, it spec.S) { h.AssertNil(t, err) h.AssertEq(t, subject.DefaultBuilder, "") h.AssertEq(t, len(subject.RunImages), 0) + h.AssertEq(t, subject.Experimental, false) }) }) })