INNER CODE UNIT · Go

TestReadFlags_MutuallyExclusive

arttor/helmify · cmd/helmify/flags_test.go:28

func TestReadFlags_MutuallyExclusive(t *testing.T) {
	oldArgs := os.Args
	oldCommandLine := flag.CommandLine

	t.Cleanup(func() {
		os.Args = oldArgs
		flag.CommandLine = oldCommandLine
	})

	os.Args = []string{
		"helmify",
		"-crd-dir",
		"-optional-crds",
	}

	flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ContinueOnError)

	_, err := ReadFlags()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…