INNER CODE UNIT · Go

TestCommandLineFlags

cristianoliveira/ergo · main_test.go:520

func TestCommandLineFlags(t *testing.T) {
	commands := []string{"list", "list-names", "run"}

	for _, cmd := range commands {
		cases := []struct {
			title  string
			args   []string
			config *proxy.Config
		}{
			{
				title: "when -domain flag is passed for " + cmd,
				args:  []string{"ergo", cmd, "-domain", ".foo"},
				config: &proxy.Config{
					Domain: ".foo",
				},
			},
			{
				title: "when -config flag is passed for " + cmd,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…