INNER CODE UNIT · Go

TestReadFlags_DefaultValuesMatchFlagDefaults

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

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

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

	os.Args = []string{"helmify"}
	resetFlags(t)

	cfg, err := ReadFlags()
	require.NoError(t, err)

	stringTests := []struct {
		flagName string
		getValue func(cfg config.Config) string

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…