(t *testing.T)
| 112 | } |
| 113 | |
| 114 | func TestUserAgent(t *testing.T) { |
| 115 | cmd, err := invokeProxyCommand( |
| 116 | []string{ |
| 117 | "--user-agent", |
| 118 | "cloud-sql-proxy-operator/0.0.1", |
| 119 | "proj:region:inst", |
| 120 | }, |
| 121 | ) |
| 122 | if err != nil { |
| 123 | t.Fatalf("want error = nil, got = %v", err) |
| 124 | } |
| 125 | |
| 126 | want := "cloud-sql-proxy-operator/0.0.1" |
| 127 | got := cmd.conf.UserAgent |
| 128 | if !strings.Contains(got, want) { |
| 129 | t.Errorf("expected userAgent to contain: %v; got: %v", want, got) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | func TestNewCommandArguments(t *testing.T) { |
| 134 | tcs := []struct { |
nothing calls this directly
no test coverage detected