(t *testing.T)
| 191 | } |
| 192 | |
| 193 | func (s) TestParseWaitForReady(t *testing.T) { |
| 194 | testcases := []parseTestCase{ |
| 195 | { |
| 196 | scjs: `{ |
| 197 | "methodConfig": [ |
| 198 | { |
| 199 | "name": [ |
| 200 | { |
| 201 | "service": "foo", |
| 202 | "method": "Bar" |
| 203 | } |
| 204 | ], |
| 205 | "waitForReady": true |
| 206 | } |
| 207 | ] |
| 208 | }`, |
| 209 | wantSC: &ServiceConfig{ |
| 210 | Methods: map[string]MethodConfig{ |
| 211 | "/foo/Bar": { |
| 212 | WaitForReady: newBool(true), |
| 213 | }, |
| 214 | }, |
| 215 | lbConfig: lbConfigFor(t, "", nil), |
| 216 | }, |
| 217 | }, |
| 218 | { |
| 219 | scjs: `{ |
| 220 | "methodConfig": [ |
| 221 | { |
| 222 | "name": [ |
| 223 | { |
| 224 | "service": "foo", |
| 225 | "method": "Bar" |
| 226 | } |
| 227 | ], |
| 228 | "waitForReady": false |
| 229 | } |
| 230 | ] |
| 231 | }`, |
| 232 | wantSC: &ServiceConfig{ |
| 233 | Methods: map[string]MethodConfig{ |
| 234 | "/foo/Bar": { |
| 235 | WaitForReady: newBool(false), |
| 236 | }, |
| 237 | }, |
| 238 | lbConfig: lbConfigFor(t, "", nil), |
| 239 | }, |
| 240 | }, |
| 241 | { |
| 242 | scjs: `{ |
| 243 | "methodConfig": [ |
| 244 | { |
| 245 | "name": [ |
| 246 | { |
| 247 | "service": "foo", |
| 248 | "method": "Bar" |
| 249 | } |
| 250 | ], |
nothing calls this directly
no test coverage detected