OLD | NEW |
1 library googleapis.container.v1.test; | 1 library googleapis.container.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
11 | 11 |
12 import 'package:googleapis/container/v1.dart' as api; | 12 import 'package:googleapis/container/v1.dart' as api; |
13 | 13 |
14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
15 core.Function _callback; | 15 core.Function _callback; |
16 core.bool _expectJson; | 16 core.bool _expectJson; |
17 | 17 |
18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
19 _callback = callback; | 19 _callback = callback; |
20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
(...skipping 18 matching lines...) Expand all Loading... |
39 } else { | 39 } else { |
40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
41 return _callback(request, data); | 41 return _callback(request, data); |
42 }); | 42 }); |
43 } | 43 } |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 core.int buildCounterAddonsConfig = 0; | 54 core.int buildCounterAddonsConfig = 0; |
55 buildAddonsConfig() { | 55 buildAddonsConfig() { |
56 var o = new api.AddonsConfig(); | 56 var o = new api.AddonsConfig(); |
57 buildCounterAddonsConfig++; | 57 buildCounterAddonsConfig++; |
58 if (buildCounterAddonsConfig < 3) { | 58 if (buildCounterAddonsConfig < 3) { |
59 o.horizontalPodAutoscaling = buildHorizontalPodAutoscaling(); | 59 o.horizontalPodAutoscaling = buildHorizontalPodAutoscaling(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return o; | 103 return o; |
104 } | 104 } |
105 | 105 |
106 checkCancelOperationRequest(api.CancelOperationRequest o) { | 106 checkCancelOperationRequest(api.CancelOperationRequest o) { |
107 buildCounterCancelOperationRequest++; | 107 buildCounterCancelOperationRequest++; |
108 if (buildCounterCancelOperationRequest < 3) { | 108 if (buildCounterCancelOperationRequest < 3) { |
109 } | 109 } |
110 buildCounterCancelOperationRequest--; | 110 buildCounterCancelOperationRequest--; |
111 } | 111 } |
112 | 112 |
113 buildUnnamed1710() { | 113 buildUnnamed1720() { |
114 var o = new core.List<core.String>(); | 114 var o = new core.List<core.String>(); |
115 o.add("foo"); | 115 o.add("foo"); |
116 o.add("foo"); | 116 o.add("foo"); |
117 return o; | 117 return o; |
118 } | 118 } |
119 | 119 |
120 checkUnnamed1710(core.List<core.String> o) { | 120 checkUnnamed1720(core.List<core.String> o) { |
121 unittest.expect(o, unittest.hasLength(2)); | 121 unittest.expect(o, unittest.hasLength(2)); |
122 unittest.expect(o[0], unittest.equals('foo')); | 122 unittest.expect(o[0], unittest.equals('foo')); |
123 unittest.expect(o[1], unittest.equals('foo')); | 123 unittest.expect(o[1], unittest.equals('foo')); |
124 } | 124 } |
125 | 125 |
126 buildUnnamed1711() { | 126 buildUnnamed1721() { |
127 var o = new core.List<core.String>(); | 127 var o = new core.List<core.String>(); |
128 o.add("foo"); | 128 o.add("foo"); |
129 o.add("foo"); | 129 o.add("foo"); |
130 return o; | 130 return o; |
131 } | 131 } |
132 | 132 |
133 checkUnnamed1711(core.List<core.String> o) { | 133 checkUnnamed1721(core.List<core.String> o) { |
134 unittest.expect(o, unittest.hasLength(2)); | 134 unittest.expect(o, unittest.hasLength(2)); |
135 unittest.expect(o[0], unittest.equals('foo')); | 135 unittest.expect(o[0], unittest.equals('foo')); |
136 unittest.expect(o[1], unittest.equals('foo')); | 136 unittest.expect(o[1], unittest.equals('foo')); |
137 } | 137 } |
138 | 138 |
139 buildUnnamed1712() { | 139 buildUnnamed1722() { |
140 var o = new core.List<api.NodePool>(); | 140 var o = new core.List<api.NodePool>(); |
141 o.add(buildNodePool()); | 141 o.add(buildNodePool()); |
142 o.add(buildNodePool()); | 142 o.add(buildNodePool()); |
143 return o; | 143 return o; |
144 } | 144 } |
145 | 145 |
146 checkUnnamed1712(core.List<api.NodePool> o) { | 146 checkUnnamed1722(core.List<api.NodePool> o) { |
147 unittest.expect(o, unittest.hasLength(2)); | 147 unittest.expect(o, unittest.hasLength(2)); |
148 checkNodePool(o[0]); | 148 checkNodePool(o[0]); |
149 checkNodePool(o[1]); | 149 checkNodePool(o[1]); |
150 } | 150 } |
151 | 151 |
152 buildUnnamed1713() { | 152 buildUnnamed1723() { |
153 var o = new core.Map<core.String, core.String>(); | 153 var o = new core.Map<core.String, core.String>(); |
154 o["x"] = "foo"; | 154 o["x"] = "foo"; |
155 o["y"] = "foo"; | 155 o["y"] = "foo"; |
156 return o; | 156 return o; |
157 } | 157 } |
158 | 158 |
159 checkUnnamed1713(core.Map<core.String, core.String> o) { | 159 checkUnnamed1723(core.Map<core.String, core.String> o) { |
160 unittest.expect(o, unittest.hasLength(2)); | 160 unittest.expect(o, unittest.hasLength(2)); |
161 unittest.expect(o["x"], unittest.equals('foo')); | 161 unittest.expect(o["x"], unittest.equals('foo')); |
162 unittest.expect(o["y"], unittest.equals('foo')); | 162 unittest.expect(o["y"], unittest.equals('foo')); |
163 } | 163 } |
164 | 164 |
165 core.int buildCounterCluster = 0; | 165 core.int buildCounterCluster = 0; |
166 buildCluster() { | 166 buildCluster() { |
167 var o = new api.Cluster(); | 167 var o = new api.Cluster(); |
168 buildCounterCluster++; | 168 buildCounterCluster++; |
169 if (buildCounterCluster < 3) { | 169 if (buildCounterCluster < 3) { |
170 o.addonsConfig = buildAddonsConfig(); | 170 o.addonsConfig = buildAddonsConfig(); |
171 o.clusterIpv4Cidr = "foo"; | 171 o.clusterIpv4Cidr = "foo"; |
172 o.createTime = "foo"; | 172 o.createTime = "foo"; |
173 o.currentMasterVersion = "foo"; | 173 o.currentMasterVersion = "foo"; |
174 o.currentNodeCount = 42; | 174 o.currentNodeCount = 42; |
175 o.currentNodeVersion = "foo"; | 175 o.currentNodeVersion = "foo"; |
176 o.description = "foo"; | 176 o.description = "foo"; |
177 o.enableKubernetesAlpha = true; | 177 o.enableKubernetesAlpha = true; |
178 o.endpoint = "foo"; | 178 o.endpoint = "foo"; |
179 o.expireTime = "foo"; | 179 o.expireTime = "foo"; |
180 o.initialClusterVersion = "foo"; | 180 o.initialClusterVersion = "foo"; |
181 o.initialNodeCount = 42; | 181 o.initialNodeCount = 42; |
182 o.instanceGroupUrls = buildUnnamed1710(); | 182 o.instanceGroupUrls = buildUnnamed1720(); |
183 o.labelFingerprint = "foo"; | 183 o.labelFingerprint = "foo"; |
184 o.legacyAbac = buildLegacyAbac(); | 184 o.legacyAbac = buildLegacyAbac(); |
185 o.locations = buildUnnamed1711(); | 185 o.locations = buildUnnamed1721(); |
186 o.loggingService = "foo"; | 186 o.loggingService = "foo"; |
187 o.masterAuth = buildMasterAuth(); | 187 o.masterAuth = buildMasterAuth(); |
188 o.monitoringService = "foo"; | 188 o.monitoringService = "foo"; |
189 o.name = "foo"; | 189 o.name = "foo"; |
190 o.network = "foo"; | 190 o.network = "foo"; |
191 o.nodeConfig = buildNodeConfig(); | 191 o.nodeConfig = buildNodeConfig(); |
192 o.nodeIpv4CidrSize = 42; | 192 o.nodeIpv4CidrSize = 42; |
193 o.nodePools = buildUnnamed1712(); | 193 o.nodePools = buildUnnamed1722(); |
194 o.resourceLabels = buildUnnamed1713(); | 194 o.resourceLabels = buildUnnamed1723(); |
195 o.selfLink = "foo"; | 195 o.selfLink = "foo"; |
196 o.servicesIpv4Cidr = "foo"; | 196 o.servicesIpv4Cidr = "foo"; |
197 o.status = "foo"; | 197 o.status = "foo"; |
198 o.statusMessage = "foo"; | 198 o.statusMessage = "foo"; |
199 o.subnetwork = "foo"; | 199 o.subnetwork = "foo"; |
200 o.zone = "foo"; | 200 o.zone = "foo"; |
201 } | 201 } |
202 buildCounterCluster--; | 202 buildCounterCluster--; |
203 return o; | 203 return o; |
204 } | 204 } |
205 | 205 |
206 checkCluster(api.Cluster o) { | 206 checkCluster(api.Cluster o) { |
207 buildCounterCluster++; | 207 buildCounterCluster++; |
208 if (buildCounterCluster < 3) { | 208 if (buildCounterCluster < 3) { |
209 checkAddonsConfig(o.addonsConfig); | 209 checkAddonsConfig(o.addonsConfig); |
210 unittest.expect(o.clusterIpv4Cidr, unittest.equals('foo')); | 210 unittest.expect(o.clusterIpv4Cidr, unittest.equals('foo')); |
211 unittest.expect(o.createTime, unittest.equals('foo')); | 211 unittest.expect(o.createTime, unittest.equals('foo')); |
212 unittest.expect(o.currentMasterVersion, unittest.equals('foo')); | 212 unittest.expect(o.currentMasterVersion, unittest.equals('foo')); |
213 unittest.expect(o.currentNodeCount, unittest.equals(42)); | 213 unittest.expect(o.currentNodeCount, unittest.equals(42)); |
214 unittest.expect(o.currentNodeVersion, unittest.equals('foo')); | 214 unittest.expect(o.currentNodeVersion, unittest.equals('foo')); |
215 unittest.expect(o.description, unittest.equals('foo')); | 215 unittest.expect(o.description, unittest.equals('foo')); |
216 unittest.expect(o.enableKubernetesAlpha, unittest.isTrue); | 216 unittest.expect(o.enableKubernetesAlpha, unittest.isTrue); |
217 unittest.expect(o.endpoint, unittest.equals('foo')); | 217 unittest.expect(o.endpoint, unittest.equals('foo')); |
218 unittest.expect(o.expireTime, unittest.equals('foo')); | 218 unittest.expect(o.expireTime, unittest.equals('foo')); |
219 unittest.expect(o.initialClusterVersion, unittest.equals('foo')); | 219 unittest.expect(o.initialClusterVersion, unittest.equals('foo')); |
220 unittest.expect(o.initialNodeCount, unittest.equals(42)); | 220 unittest.expect(o.initialNodeCount, unittest.equals(42)); |
221 checkUnnamed1710(o.instanceGroupUrls); | 221 checkUnnamed1720(o.instanceGroupUrls); |
222 unittest.expect(o.labelFingerprint, unittest.equals('foo')); | 222 unittest.expect(o.labelFingerprint, unittest.equals('foo')); |
223 checkLegacyAbac(o.legacyAbac); | 223 checkLegacyAbac(o.legacyAbac); |
224 checkUnnamed1711(o.locations); | 224 checkUnnamed1721(o.locations); |
225 unittest.expect(o.loggingService, unittest.equals('foo')); | 225 unittest.expect(o.loggingService, unittest.equals('foo')); |
226 checkMasterAuth(o.masterAuth); | 226 checkMasterAuth(o.masterAuth); |
227 unittest.expect(o.monitoringService, unittest.equals('foo')); | 227 unittest.expect(o.monitoringService, unittest.equals('foo')); |
228 unittest.expect(o.name, unittest.equals('foo')); | 228 unittest.expect(o.name, unittest.equals('foo')); |
229 unittest.expect(o.network, unittest.equals('foo')); | 229 unittest.expect(o.network, unittest.equals('foo')); |
230 checkNodeConfig(o.nodeConfig); | 230 checkNodeConfig(o.nodeConfig); |
231 unittest.expect(o.nodeIpv4CidrSize, unittest.equals(42)); | 231 unittest.expect(o.nodeIpv4CidrSize, unittest.equals(42)); |
232 checkUnnamed1712(o.nodePools); | 232 checkUnnamed1722(o.nodePools); |
233 checkUnnamed1713(o.resourceLabels); | 233 checkUnnamed1723(o.resourceLabels); |
234 unittest.expect(o.selfLink, unittest.equals('foo')); | 234 unittest.expect(o.selfLink, unittest.equals('foo')); |
235 unittest.expect(o.servicesIpv4Cidr, unittest.equals('foo')); | 235 unittest.expect(o.servicesIpv4Cidr, unittest.equals('foo')); |
236 unittest.expect(o.status, unittest.equals('foo')); | 236 unittest.expect(o.status, unittest.equals('foo')); |
237 unittest.expect(o.statusMessage, unittest.equals('foo')); | 237 unittest.expect(o.statusMessage, unittest.equals('foo')); |
238 unittest.expect(o.subnetwork, unittest.equals('foo')); | 238 unittest.expect(o.subnetwork, unittest.equals('foo')); |
239 unittest.expect(o.zone, unittest.equals('foo')); | 239 unittest.expect(o.zone, unittest.equals('foo')); |
240 } | 240 } |
241 buildCounterCluster--; | 241 buildCounterCluster--; |
242 } | 242 } |
243 | 243 |
244 buildUnnamed1714() { | 244 buildUnnamed1724() { |
245 var o = new core.List<core.String>(); | 245 var o = new core.List<core.String>(); |
246 o.add("foo"); | 246 o.add("foo"); |
247 o.add("foo"); | 247 o.add("foo"); |
248 return o; | 248 return o; |
249 } | 249 } |
250 | 250 |
251 checkUnnamed1714(core.List<core.String> o) { | 251 checkUnnamed1724(core.List<core.String> o) { |
252 unittest.expect(o, unittest.hasLength(2)); | 252 unittest.expect(o, unittest.hasLength(2)); |
253 unittest.expect(o[0], unittest.equals('foo')); | 253 unittest.expect(o[0], unittest.equals('foo')); |
254 unittest.expect(o[1], unittest.equals('foo')); | 254 unittest.expect(o[1], unittest.equals('foo')); |
255 } | 255 } |
256 | 256 |
257 core.int buildCounterClusterUpdate = 0; | 257 core.int buildCounterClusterUpdate = 0; |
258 buildClusterUpdate() { | 258 buildClusterUpdate() { |
259 var o = new api.ClusterUpdate(); | 259 var o = new api.ClusterUpdate(); |
260 buildCounterClusterUpdate++; | 260 buildCounterClusterUpdate++; |
261 if (buildCounterClusterUpdate < 3) { | 261 if (buildCounterClusterUpdate < 3) { |
262 o.desiredAddonsConfig = buildAddonsConfig(); | 262 o.desiredAddonsConfig = buildAddonsConfig(); |
263 o.desiredImageType = "foo"; | 263 o.desiredImageType = "foo"; |
264 o.desiredLocations = buildUnnamed1714(); | 264 o.desiredLocations = buildUnnamed1724(); |
265 o.desiredMasterVersion = "foo"; | 265 o.desiredMasterVersion = "foo"; |
266 o.desiredMonitoringService = "foo"; | 266 o.desiredMonitoringService = "foo"; |
267 o.desiredNodePoolAutoscaling = buildNodePoolAutoscaling(); | 267 o.desiredNodePoolAutoscaling = buildNodePoolAutoscaling(); |
268 o.desiredNodePoolId = "foo"; | 268 o.desiredNodePoolId = "foo"; |
269 o.desiredNodeVersion = "foo"; | 269 o.desiredNodeVersion = "foo"; |
270 } | 270 } |
271 buildCounterClusterUpdate--; | 271 buildCounterClusterUpdate--; |
272 return o; | 272 return o; |
273 } | 273 } |
274 | 274 |
275 checkClusterUpdate(api.ClusterUpdate o) { | 275 checkClusterUpdate(api.ClusterUpdate o) { |
276 buildCounterClusterUpdate++; | 276 buildCounterClusterUpdate++; |
277 if (buildCounterClusterUpdate < 3) { | 277 if (buildCounterClusterUpdate < 3) { |
278 checkAddonsConfig(o.desiredAddonsConfig); | 278 checkAddonsConfig(o.desiredAddonsConfig); |
279 unittest.expect(o.desiredImageType, unittest.equals('foo')); | 279 unittest.expect(o.desiredImageType, unittest.equals('foo')); |
280 checkUnnamed1714(o.desiredLocations); | 280 checkUnnamed1724(o.desiredLocations); |
281 unittest.expect(o.desiredMasterVersion, unittest.equals('foo')); | 281 unittest.expect(o.desiredMasterVersion, unittest.equals('foo')); |
282 unittest.expect(o.desiredMonitoringService, unittest.equals('foo')); | 282 unittest.expect(o.desiredMonitoringService, unittest.equals('foo')); |
283 checkNodePoolAutoscaling(o.desiredNodePoolAutoscaling); | 283 checkNodePoolAutoscaling(o.desiredNodePoolAutoscaling); |
284 unittest.expect(o.desiredNodePoolId, unittest.equals('foo')); | 284 unittest.expect(o.desiredNodePoolId, unittest.equals('foo')); |
285 unittest.expect(o.desiredNodeVersion, unittest.equals('foo')); | 285 unittest.expect(o.desiredNodeVersion, unittest.equals('foo')); |
286 } | 286 } |
287 buildCounterClusterUpdate--; | 287 buildCounterClusterUpdate--; |
288 } | 288 } |
289 | 289 |
290 core.int buildCounterCompleteIPRotationRequest = 0; | 290 core.int buildCounterCompleteIPRotationRequest = 0; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } | 409 } |
410 | 410 |
411 checkLegacyAbac(api.LegacyAbac o) { | 411 checkLegacyAbac(api.LegacyAbac o) { |
412 buildCounterLegacyAbac++; | 412 buildCounterLegacyAbac++; |
413 if (buildCounterLegacyAbac < 3) { | 413 if (buildCounterLegacyAbac < 3) { |
414 unittest.expect(o.enabled, unittest.isTrue); | 414 unittest.expect(o.enabled, unittest.isTrue); |
415 } | 415 } |
416 buildCounterLegacyAbac--; | 416 buildCounterLegacyAbac--; |
417 } | 417 } |
418 | 418 |
419 buildUnnamed1715() { | 419 buildUnnamed1725() { |
420 var o = new core.List<api.Cluster>(); | 420 var o = new core.List<api.Cluster>(); |
421 o.add(buildCluster()); | 421 o.add(buildCluster()); |
422 o.add(buildCluster()); | 422 o.add(buildCluster()); |
423 return o; | 423 return o; |
424 } | 424 } |
425 | 425 |
426 checkUnnamed1715(core.List<api.Cluster> o) { | 426 checkUnnamed1725(core.List<api.Cluster> o) { |
427 unittest.expect(o, unittest.hasLength(2)); | 427 unittest.expect(o, unittest.hasLength(2)); |
428 checkCluster(o[0]); | 428 checkCluster(o[0]); |
429 checkCluster(o[1]); | 429 checkCluster(o[1]); |
430 } | 430 } |
431 | 431 |
432 buildUnnamed1716() { | 432 buildUnnamed1726() { |
433 var o = new core.List<core.String>(); | 433 var o = new core.List<core.String>(); |
434 o.add("foo"); | 434 o.add("foo"); |
435 o.add("foo"); | 435 o.add("foo"); |
436 return o; | 436 return o; |
437 } | 437 } |
438 | 438 |
439 checkUnnamed1716(core.List<core.String> o) { | 439 checkUnnamed1726(core.List<core.String> o) { |
440 unittest.expect(o, unittest.hasLength(2)); | 440 unittest.expect(o, unittest.hasLength(2)); |
441 unittest.expect(o[0], unittest.equals('foo')); | 441 unittest.expect(o[0], unittest.equals('foo')); |
442 unittest.expect(o[1], unittest.equals('foo')); | 442 unittest.expect(o[1], unittest.equals('foo')); |
443 } | 443 } |
444 | 444 |
445 core.int buildCounterListClustersResponse = 0; | 445 core.int buildCounterListClustersResponse = 0; |
446 buildListClustersResponse() { | 446 buildListClustersResponse() { |
447 var o = new api.ListClustersResponse(); | 447 var o = new api.ListClustersResponse(); |
448 buildCounterListClustersResponse++; | 448 buildCounterListClustersResponse++; |
449 if (buildCounterListClustersResponse < 3) { | 449 if (buildCounterListClustersResponse < 3) { |
450 o.clusters = buildUnnamed1715(); | 450 o.clusters = buildUnnamed1725(); |
451 o.missingZones = buildUnnamed1716(); | 451 o.missingZones = buildUnnamed1726(); |
452 } | 452 } |
453 buildCounterListClustersResponse--; | 453 buildCounterListClustersResponse--; |
454 return o; | 454 return o; |
455 } | 455 } |
456 | 456 |
457 checkListClustersResponse(api.ListClustersResponse o) { | 457 checkListClustersResponse(api.ListClustersResponse o) { |
458 buildCounterListClustersResponse++; | 458 buildCounterListClustersResponse++; |
459 if (buildCounterListClustersResponse < 3) { | 459 if (buildCounterListClustersResponse < 3) { |
460 checkUnnamed1715(o.clusters); | 460 checkUnnamed1725(o.clusters); |
461 checkUnnamed1716(o.missingZones); | 461 checkUnnamed1726(o.missingZones); |
462 } | 462 } |
463 buildCounterListClustersResponse--; | 463 buildCounterListClustersResponse--; |
464 } | 464 } |
465 | 465 |
466 buildUnnamed1717() { | 466 buildUnnamed1727() { |
467 var o = new core.List<api.NodePool>(); | 467 var o = new core.List<api.NodePool>(); |
468 o.add(buildNodePool()); | 468 o.add(buildNodePool()); |
469 o.add(buildNodePool()); | 469 o.add(buildNodePool()); |
470 return o; | 470 return o; |
471 } | 471 } |
472 | 472 |
473 checkUnnamed1717(core.List<api.NodePool> o) { | 473 checkUnnamed1727(core.List<api.NodePool> o) { |
474 unittest.expect(o, unittest.hasLength(2)); | 474 unittest.expect(o, unittest.hasLength(2)); |
475 checkNodePool(o[0]); | 475 checkNodePool(o[0]); |
476 checkNodePool(o[1]); | 476 checkNodePool(o[1]); |
477 } | 477 } |
478 | 478 |
479 core.int buildCounterListNodePoolsResponse = 0; | 479 core.int buildCounterListNodePoolsResponse = 0; |
480 buildListNodePoolsResponse() { | 480 buildListNodePoolsResponse() { |
481 var o = new api.ListNodePoolsResponse(); | 481 var o = new api.ListNodePoolsResponse(); |
482 buildCounterListNodePoolsResponse++; | 482 buildCounterListNodePoolsResponse++; |
483 if (buildCounterListNodePoolsResponse < 3) { | 483 if (buildCounterListNodePoolsResponse < 3) { |
484 o.nodePools = buildUnnamed1717(); | 484 o.nodePools = buildUnnamed1727(); |
485 } | 485 } |
486 buildCounterListNodePoolsResponse--; | 486 buildCounterListNodePoolsResponse--; |
487 return o; | 487 return o; |
488 } | 488 } |
489 | 489 |
490 checkListNodePoolsResponse(api.ListNodePoolsResponse o) { | 490 checkListNodePoolsResponse(api.ListNodePoolsResponse o) { |
491 buildCounterListNodePoolsResponse++; | 491 buildCounterListNodePoolsResponse++; |
492 if (buildCounterListNodePoolsResponse < 3) { | 492 if (buildCounterListNodePoolsResponse < 3) { |
493 checkUnnamed1717(o.nodePools); | 493 checkUnnamed1727(o.nodePools); |
494 } | 494 } |
495 buildCounterListNodePoolsResponse--; | 495 buildCounterListNodePoolsResponse--; |
496 } | 496 } |
497 | 497 |
498 buildUnnamed1718() { | 498 buildUnnamed1728() { |
499 var o = new core.List<core.String>(); | 499 var o = new core.List<core.String>(); |
500 o.add("foo"); | 500 o.add("foo"); |
501 o.add("foo"); | 501 o.add("foo"); |
502 return o; | 502 return o; |
503 } | 503 } |
504 | 504 |
505 checkUnnamed1718(core.List<core.String> o) { | 505 checkUnnamed1728(core.List<core.String> o) { |
506 unittest.expect(o, unittest.hasLength(2)); | 506 unittest.expect(o, unittest.hasLength(2)); |
507 unittest.expect(o[0], unittest.equals('foo')); | 507 unittest.expect(o[0], unittest.equals('foo')); |
508 unittest.expect(o[1], unittest.equals('foo')); | 508 unittest.expect(o[1], unittest.equals('foo')); |
509 } | 509 } |
510 | 510 |
511 buildUnnamed1719() { | 511 buildUnnamed1729() { |
512 var o = new core.List<api.Operation>(); | 512 var o = new core.List<api.Operation>(); |
513 o.add(buildOperation()); | 513 o.add(buildOperation()); |
514 o.add(buildOperation()); | 514 o.add(buildOperation()); |
515 return o; | 515 return o; |
516 } | 516 } |
517 | 517 |
518 checkUnnamed1719(core.List<api.Operation> o) { | 518 checkUnnamed1729(core.List<api.Operation> o) { |
519 unittest.expect(o, unittest.hasLength(2)); | 519 unittest.expect(o, unittest.hasLength(2)); |
520 checkOperation(o[0]); | 520 checkOperation(o[0]); |
521 checkOperation(o[1]); | 521 checkOperation(o[1]); |
522 } | 522 } |
523 | 523 |
524 core.int buildCounterListOperationsResponse = 0; | 524 core.int buildCounterListOperationsResponse = 0; |
525 buildListOperationsResponse() { | 525 buildListOperationsResponse() { |
526 var o = new api.ListOperationsResponse(); | 526 var o = new api.ListOperationsResponse(); |
527 buildCounterListOperationsResponse++; | 527 buildCounterListOperationsResponse++; |
528 if (buildCounterListOperationsResponse < 3) { | 528 if (buildCounterListOperationsResponse < 3) { |
529 o.missingZones = buildUnnamed1718(); | 529 o.missingZones = buildUnnamed1728(); |
530 o.operations = buildUnnamed1719(); | 530 o.operations = buildUnnamed1729(); |
531 } | 531 } |
532 buildCounterListOperationsResponse--; | 532 buildCounterListOperationsResponse--; |
533 return o; | 533 return o; |
534 } | 534 } |
535 | 535 |
536 checkListOperationsResponse(api.ListOperationsResponse o) { | 536 checkListOperationsResponse(api.ListOperationsResponse o) { |
537 buildCounterListOperationsResponse++; | 537 buildCounterListOperationsResponse++; |
538 if (buildCounterListOperationsResponse < 3) { | 538 if (buildCounterListOperationsResponse < 3) { |
539 checkUnnamed1718(o.missingZones); | 539 checkUnnamed1728(o.missingZones); |
540 checkUnnamed1719(o.operations); | 540 checkUnnamed1729(o.operations); |
541 } | 541 } |
542 buildCounterListOperationsResponse--; | 542 buildCounterListOperationsResponse--; |
543 } | 543 } |
544 | 544 |
545 core.int buildCounterMasterAuth = 0; | 545 core.int buildCounterMasterAuth = 0; |
546 buildMasterAuth() { | 546 buildMasterAuth() { |
547 var o = new api.MasterAuth(); | 547 var o = new api.MasterAuth(); |
548 buildCounterMasterAuth++; | 548 buildCounterMasterAuth++; |
549 if (buildCounterMasterAuth < 3) { | 549 if (buildCounterMasterAuth < 3) { |
550 o.clientCertificate = "foo"; | 550 o.clientCertificate = "foo"; |
(...skipping 11 matching lines...) Expand all Loading... |
562 if (buildCounterMasterAuth < 3) { | 562 if (buildCounterMasterAuth < 3) { |
563 unittest.expect(o.clientCertificate, unittest.equals('foo')); | 563 unittest.expect(o.clientCertificate, unittest.equals('foo')); |
564 unittest.expect(o.clientKey, unittest.equals('foo')); | 564 unittest.expect(o.clientKey, unittest.equals('foo')); |
565 unittest.expect(o.clusterCaCertificate, unittest.equals('foo')); | 565 unittest.expect(o.clusterCaCertificate, unittest.equals('foo')); |
566 unittest.expect(o.password, unittest.equals('foo')); | 566 unittest.expect(o.password, unittest.equals('foo')); |
567 unittest.expect(o.username, unittest.equals('foo')); | 567 unittest.expect(o.username, unittest.equals('foo')); |
568 } | 568 } |
569 buildCounterMasterAuth--; | 569 buildCounterMasterAuth--; |
570 } | 570 } |
571 | 571 |
572 buildUnnamed1720() { | 572 buildUnnamed1730() { |
573 var o = new core.Map<core.String, core.String>(); | 573 var o = new core.Map<core.String, core.String>(); |
574 o["x"] = "foo"; | 574 o["x"] = "foo"; |
575 o["y"] = "foo"; | 575 o["y"] = "foo"; |
576 return o; | 576 return o; |
577 } | 577 } |
578 | 578 |
579 checkUnnamed1720(core.Map<core.String, core.String> o) { | 579 checkUnnamed1730(core.Map<core.String, core.String> o) { |
580 unittest.expect(o, unittest.hasLength(2)); | 580 unittest.expect(o, unittest.hasLength(2)); |
581 unittest.expect(o["x"], unittest.equals('foo')); | 581 unittest.expect(o["x"], unittest.equals('foo')); |
582 unittest.expect(o["y"], unittest.equals('foo')); | 582 unittest.expect(o["y"], unittest.equals('foo')); |
583 } | 583 } |
584 | 584 |
585 buildUnnamed1721() { | 585 buildUnnamed1731() { |
586 var o = new core.Map<core.String, core.String>(); | 586 var o = new core.Map<core.String, core.String>(); |
587 o["x"] = "foo"; | 587 o["x"] = "foo"; |
588 o["y"] = "foo"; | 588 o["y"] = "foo"; |
589 return o; | 589 return o; |
590 } | 590 } |
591 | 591 |
592 checkUnnamed1721(core.Map<core.String, core.String> o) { | 592 checkUnnamed1731(core.Map<core.String, core.String> o) { |
593 unittest.expect(o, unittest.hasLength(2)); | 593 unittest.expect(o, unittest.hasLength(2)); |
594 unittest.expect(o["x"], unittest.equals('foo')); | 594 unittest.expect(o["x"], unittest.equals('foo')); |
595 unittest.expect(o["y"], unittest.equals('foo')); | 595 unittest.expect(o["y"], unittest.equals('foo')); |
596 } | 596 } |
597 | 597 |
598 buildUnnamed1722() { | 598 buildUnnamed1732() { |
599 var o = new core.List<core.String>(); | 599 var o = new core.List<core.String>(); |
600 o.add("foo"); | 600 o.add("foo"); |
601 o.add("foo"); | 601 o.add("foo"); |
602 return o; | 602 return o; |
603 } | 603 } |
604 | 604 |
605 checkUnnamed1722(core.List<core.String> o) { | 605 checkUnnamed1732(core.List<core.String> o) { |
606 unittest.expect(o, unittest.hasLength(2)); | 606 unittest.expect(o, unittest.hasLength(2)); |
607 unittest.expect(o[0], unittest.equals('foo')); | 607 unittest.expect(o[0], unittest.equals('foo')); |
608 unittest.expect(o[1], unittest.equals('foo')); | 608 unittest.expect(o[1], unittest.equals('foo')); |
609 } | 609 } |
610 | 610 |
611 buildUnnamed1723() { | 611 buildUnnamed1733() { |
612 var o = new core.List<core.String>(); | 612 var o = new core.List<core.String>(); |
613 o.add("foo"); | 613 o.add("foo"); |
614 o.add("foo"); | 614 o.add("foo"); |
615 return o; | 615 return o; |
616 } | 616 } |
617 | 617 |
618 checkUnnamed1723(core.List<core.String> o) { | 618 checkUnnamed1733(core.List<core.String> o) { |
619 unittest.expect(o, unittest.hasLength(2)); | 619 unittest.expect(o, unittest.hasLength(2)); |
620 unittest.expect(o[0], unittest.equals('foo')); | 620 unittest.expect(o[0], unittest.equals('foo')); |
621 unittest.expect(o[1], unittest.equals('foo')); | 621 unittest.expect(o[1], unittest.equals('foo')); |
622 } | 622 } |
623 | 623 |
624 core.int buildCounterNodeConfig = 0; | 624 core.int buildCounterNodeConfig = 0; |
625 buildNodeConfig() { | 625 buildNodeConfig() { |
626 var o = new api.NodeConfig(); | 626 var o = new api.NodeConfig(); |
627 buildCounterNodeConfig++; | 627 buildCounterNodeConfig++; |
628 if (buildCounterNodeConfig < 3) { | 628 if (buildCounterNodeConfig < 3) { |
629 o.diskSizeGb = 42; | 629 o.diskSizeGb = 42; |
630 o.imageType = "foo"; | 630 o.imageType = "foo"; |
631 o.labels = buildUnnamed1720(); | 631 o.labels = buildUnnamed1730(); |
632 o.localSsdCount = 42; | 632 o.localSsdCount = 42; |
633 o.machineType = "foo"; | 633 o.machineType = "foo"; |
634 o.metadata = buildUnnamed1721(); | 634 o.metadata = buildUnnamed1731(); |
635 o.oauthScopes = buildUnnamed1722(); | 635 o.oauthScopes = buildUnnamed1732(); |
636 o.preemptible = true; | 636 o.preemptible = true; |
637 o.serviceAccount = "foo"; | 637 o.serviceAccount = "foo"; |
638 o.tags = buildUnnamed1723(); | 638 o.tags = buildUnnamed1733(); |
639 } | 639 } |
640 buildCounterNodeConfig--; | 640 buildCounterNodeConfig--; |
641 return o; | 641 return o; |
642 } | 642 } |
643 | 643 |
644 checkNodeConfig(api.NodeConfig o) { | 644 checkNodeConfig(api.NodeConfig o) { |
645 buildCounterNodeConfig++; | 645 buildCounterNodeConfig++; |
646 if (buildCounterNodeConfig < 3) { | 646 if (buildCounterNodeConfig < 3) { |
647 unittest.expect(o.diskSizeGb, unittest.equals(42)); | 647 unittest.expect(o.diskSizeGb, unittest.equals(42)); |
648 unittest.expect(o.imageType, unittest.equals('foo')); | 648 unittest.expect(o.imageType, unittest.equals('foo')); |
649 checkUnnamed1720(o.labels); | 649 checkUnnamed1730(o.labels); |
650 unittest.expect(o.localSsdCount, unittest.equals(42)); | 650 unittest.expect(o.localSsdCount, unittest.equals(42)); |
651 unittest.expect(o.machineType, unittest.equals('foo')); | 651 unittest.expect(o.machineType, unittest.equals('foo')); |
652 checkUnnamed1721(o.metadata); | 652 checkUnnamed1731(o.metadata); |
653 checkUnnamed1722(o.oauthScopes); | 653 checkUnnamed1732(o.oauthScopes); |
654 unittest.expect(o.preemptible, unittest.isTrue); | 654 unittest.expect(o.preemptible, unittest.isTrue); |
655 unittest.expect(o.serviceAccount, unittest.equals('foo')); | 655 unittest.expect(o.serviceAccount, unittest.equals('foo')); |
656 checkUnnamed1723(o.tags); | 656 checkUnnamed1733(o.tags); |
657 } | 657 } |
658 buildCounterNodeConfig--; | 658 buildCounterNodeConfig--; |
659 } | 659 } |
660 | 660 |
661 core.int buildCounterNodeManagement = 0; | 661 core.int buildCounterNodeManagement = 0; |
662 buildNodeManagement() { | 662 buildNodeManagement() { |
663 var o = new api.NodeManagement(); | 663 var o = new api.NodeManagement(); |
664 buildCounterNodeManagement++; | 664 buildCounterNodeManagement++; |
665 if (buildCounterNodeManagement < 3) { | 665 if (buildCounterNodeManagement < 3) { |
666 o.autoRepair = true; | 666 o.autoRepair = true; |
667 o.autoUpgrade = true; | 667 o.autoUpgrade = true; |
668 o.upgradeOptions = buildAutoUpgradeOptions(); | 668 o.upgradeOptions = buildAutoUpgradeOptions(); |
669 } | 669 } |
670 buildCounterNodeManagement--; | 670 buildCounterNodeManagement--; |
671 return o; | 671 return o; |
672 } | 672 } |
673 | 673 |
674 checkNodeManagement(api.NodeManagement o) { | 674 checkNodeManagement(api.NodeManagement o) { |
675 buildCounterNodeManagement++; | 675 buildCounterNodeManagement++; |
676 if (buildCounterNodeManagement < 3) { | 676 if (buildCounterNodeManagement < 3) { |
677 unittest.expect(o.autoRepair, unittest.isTrue); | 677 unittest.expect(o.autoRepair, unittest.isTrue); |
678 unittest.expect(o.autoUpgrade, unittest.isTrue); | 678 unittest.expect(o.autoUpgrade, unittest.isTrue); |
679 checkAutoUpgradeOptions(o.upgradeOptions); | 679 checkAutoUpgradeOptions(o.upgradeOptions); |
680 } | 680 } |
681 buildCounterNodeManagement--; | 681 buildCounterNodeManagement--; |
682 } | 682 } |
683 | 683 |
684 buildUnnamed1724() { | 684 buildUnnamed1734() { |
685 var o = new core.List<core.String>(); | 685 var o = new core.List<core.String>(); |
686 o.add("foo"); | 686 o.add("foo"); |
687 o.add("foo"); | 687 o.add("foo"); |
688 return o; | 688 return o; |
689 } | 689 } |
690 | 690 |
691 checkUnnamed1724(core.List<core.String> o) { | 691 checkUnnamed1734(core.List<core.String> o) { |
692 unittest.expect(o, unittest.hasLength(2)); | 692 unittest.expect(o, unittest.hasLength(2)); |
693 unittest.expect(o[0], unittest.equals('foo')); | 693 unittest.expect(o[0], unittest.equals('foo')); |
694 unittest.expect(o[1], unittest.equals('foo')); | 694 unittest.expect(o[1], unittest.equals('foo')); |
695 } | 695 } |
696 | 696 |
697 core.int buildCounterNodePool = 0; | 697 core.int buildCounterNodePool = 0; |
698 buildNodePool() { | 698 buildNodePool() { |
699 var o = new api.NodePool(); | 699 var o = new api.NodePool(); |
700 buildCounterNodePool++; | 700 buildCounterNodePool++; |
701 if (buildCounterNodePool < 3) { | 701 if (buildCounterNodePool < 3) { |
702 o.autoscaling = buildNodePoolAutoscaling(); | 702 o.autoscaling = buildNodePoolAutoscaling(); |
703 o.config = buildNodeConfig(); | 703 o.config = buildNodeConfig(); |
704 o.initialNodeCount = 42; | 704 o.initialNodeCount = 42; |
705 o.instanceGroupUrls = buildUnnamed1724(); | 705 o.instanceGroupUrls = buildUnnamed1734(); |
706 o.management = buildNodeManagement(); | 706 o.management = buildNodeManagement(); |
707 o.name = "foo"; | 707 o.name = "foo"; |
708 o.selfLink = "foo"; | 708 o.selfLink = "foo"; |
709 o.status = "foo"; | 709 o.status = "foo"; |
710 o.statusMessage = "foo"; | 710 o.statusMessage = "foo"; |
711 o.version = "foo"; | 711 o.version = "foo"; |
712 } | 712 } |
713 buildCounterNodePool--; | 713 buildCounterNodePool--; |
714 return o; | 714 return o; |
715 } | 715 } |
716 | 716 |
717 checkNodePool(api.NodePool o) { | 717 checkNodePool(api.NodePool o) { |
718 buildCounterNodePool++; | 718 buildCounterNodePool++; |
719 if (buildCounterNodePool < 3) { | 719 if (buildCounterNodePool < 3) { |
720 checkNodePoolAutoscaling(o.autoscaling); | 720 checkNodePoolAutoscaling(o.autoscaling); |
721 checkNodeConfig(o.config); | 721 checkNodeConfig(o.config); |
722 unittest.expect(o.initialNodeCount, unittest.equals(42)); | 722 unittest.expect(o.initialNodeCount, unittest.equals(42)); |
723 checkUnnamed1724(o.instanceGroupUrls); | 723 checkUnnamed1734(o.instanceGroupUrls); |
724 checkNodeManagement(o.management); | 724 checkNodeManagement(o.management); |
725 unittest.expect(o.name, unittest.equals('foo')); | 725 unittest.expect(o.name, unittest.equals('foo')); |
726 unittest.expect(o.selfLink, unittest.equals('foo')); | 726 unittest.expect(o.selfLink, unittest.equals('foo')); |
727 unittest.expect(o.status, unittest.equals('foo')); | 727 unittest.expect(o.status, unittest.equals('foo')); |
728 unittest.expect(o.statusMessage, unittest.equals('foo')); | 728 unittest.expect(o.statusMessage, unittest.equals('foo')); |
729 unittest.expect(o.version, unittest.equals('foo')); | 729 unittest.expect(o.version, unittest.equals('foo')); |
730 } | 730 } |
731 buildCounterNodePool--; | 731 buildCounterNodePool--; |
732 } | 732 } |
733 | 733 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 return o; | 797 return o; |
798 } | 798 } |
799 | 799 |
800 checkRollbackNodePoolUpgradeRequest(api.RollbackNodePoolUpgradeRequest o) { | 800 checkRollbackNodePoolUpgradeRequest(api.RollbackNodePoolUpgradeRequest o) { |
801 buildCounterRollbackNodePoolUpgradeRequest++; | 801 buildCounterRollbackNodePoolUpgradeRequest++; |
802 if (buildCounterRollbackNodePoolUpgradeRequest < 3) { | 802 if (buildCounterRollbackNodePoolUpgradeRequest < 3) { |
803 } | 803 } |
804 buildCounterRollbackNodePoolUpgradeRequest--; | 804 buildCounterRollbackNodePoolUpgradeRequest--; |
805 } | 805 } |
806 | 806 |
807 buildUnnamed1725() { | 807 buildUnnamed1735() { |
808 var o = new core.List<core.String>(); | 808 var o = new core.List<core.String>(); |
809 o.add("foo"); | 809 o.add("foo"); |
810 o.add("foo"); | 810 o.add("foo"); |
811 return o; | 811 return o; |
812 } | 812 } |
813 | 813 |
814 checkUnnamed1725(core.List<core.String> o) { | 814 checkUnnamed1735(core.List<core.String> o) { |
815 unittest.expect(o, unittest.hasLength(2)); | 815 unittest.expect(o, unittest.hasLength(2)); |
816 unittest.expect(o[0], unittest.equals('foo')); | 816 unittest.expect(o[0], unittest.equals('foo')); |
817 unittest.expect(o[1], unittest.equals('foo')); | 817 unittest.expect(o[1], unittest.equals('foo')); |
818 } | 818 } |
819 | 819 |
820 buildUnnamed1726() { | 820 buildUnnamed1736() { |
821 var o = new core.List<core.String>(); | 821 var o = new core.List<core.String>(); |
822 o.add("foo"); | 822 o.add("foo"); |
823 o.add("foo"); | 823 o.add("foo"); |
824 return o; | 824 return o; |
825 } | 825 } |
826 | 826 |
827 checkUnnamed1726(core.List<core.String> o) { | 827 checkUnnamed1736(core.List<core.String> o) { |
828 unittest.expect(o, unittest.hasLength(2)); | 828 unittest.expect(o, unittest.hasLength(2)); |
829 unittest.expect(o[0], unittest.equals('foo')); | 829 unittest.expect(o[0], unittest.equals('foo')); |
830 unittest.expect(o[1], unittest.equals('foo')); | 830 unittest.expect(o[1], unittest.equals('foo')); |
831 } | 831 } |
832 | 832 |
833 buildUnnamed1727() { | 833 buildUnnamed1737() { |
834 var o = new core.List<core.String>(); | 834 var o = new core.List<core.String>(); |
835 o.add("foo"); | 835 o.add("foo"); |
836 o.add("foo"); | 836 o.add("foo"); |
837 return o; | 837 return o; |
838 } | 838 } |
839 | 839 |
840 checkUnnamed1727(core.List<core.String> o) { | 840 checkUnnamed1737(core.List<core.String> o) { |
841 unittest.expect(o, unittest.hasLength(2)); | 841 unittest.expect(o, unittest.hasLength(2)); |
842 unittest.expect(o[0], unittest.equals('foo')); | 842 unittest.expect(o[0], unittest.equals('foo')); |
843 unittest.expect(o[1], unittest.equals('foo')); | 843 unittest.expect(o[1], unittest.equals('foo')); |
844 } | 844 } |
845 | 845 |
846 core.int buildCounterServerConfig = 0; | 846 core.int buildCounterServerConfig = 0; |
847 buildServerConfig() { | 847 buildServerConfig() { |
848 var o = new api.ServerConfig(); | 848 var o = new api.ServerConfig(); |
849 buildCounterServerConfig++; | 849 buildCounterServerConfig++; |
850 if (buildCounterServerConfig < 3) { | 850 if (buildCounterServerConfig < 3) { |
851 o.defaultClusterVersion = "foo"; | 851 o.defaultClusterVersion = "foo"; |
852 o.defaultImageType = "foo"; | 852 o.defaultImageType = "foo"; |
853 o.validImageTypes = buildUnnamed1725(); | 853 o.validImageTypes = buildUnnamed1735(); |
854 o.validMasterVersions = buildUnnamed1726(); | 854 o.validMasterVersions = buildUnnamed1736(); |
855 o.validNodeVersions = buildUnnamed1727(); | 855 o.validNodeVersions = buildUnnamed1737(); |
856 } | 856 } |
857 buildCounterServerConfig--; | 857 buildCounterServerConfig--; |
858 return o; | 858 return o; |
859 } | 859 } |
860 | 860 |
861 checkServerConfig(api.ServerConfig o) { | 861 checkServerConfig(api.ServerConfig o) { |
862 buildCounterServerConfig++; | 862 buildCounterServerConfig++; |
863 if (buildCounterServerConfig < 3) { | 863 if (buildCounterServerConfig < 3) { |
864 unittest.expect(o.defaultClusterVersion, unittest.equals('foo')); | 864 unittest.expect(o.defaultClusterVersion, unittest.equals('foo')); |
865 unittest.expect(o.defaultImageType, unittest.equals('foo')); | 865 unittest.expect(o.defaultImageType, unittest.equals('foo')); |
866 checkUnnamed1725(o.validImageTypes); | 866 checkUnnamed1735(o.validImageTypes); |
867 checkUnnamed1726(o.validMasterVersions); | 867 checkUnnamed1736(o.validMasterVersions); |
868 checkUnnamed1727(o.validNodeVersions); | 868 checkUnnamed1737(o.validNodeVersions); |
869 } | 869 } |
870 buildCounterServerConfig--; | 870 buildCounterServerConfig--; |
871 } | 871 } |
872 | 872 |
873 buildUnnamed1728() { | 873 buildUnnamed1738() { |
874 var o = new core.Map<core.String, core.String>(); | 874 var o = new core.Map<core.String, core.String>(); |
875 o["x"] = "foo"; | 875 o["x"] = "foo"; |
876 o["y"] = "foo"; | 876 o["y"] = "foo"; |
877 return o; | 877 return o; |
878 } | 878 } |
879 | 879 |
880 checkUnnamed1728(core.Map<core.String, core.String> o) { | 880 checkUnnamed1738(core.Map<core.String, core.String> o) { |
881 unittest.expect(o, unittest.hasLength(2)); | 881 unittest.expect(o, unittest.hasLength(2)); |
882 unittest.expect(o["x"], unittest.equals('foo')); | 882 unittest.expect(o["x"], unittest.equals('foo')); |
883 unittest.expect(o["y"], unittest.equals('foo')); | 883 unittest.expect(o["y"], unittest.equals('foo')); |
884 } | 884 } |
885 | 885 |
886 core.int buildCounterSetLabelsRequest = 0; | 886 core.int buildCounterSetLabelsRequest = 0; |
887 buildSetLabelsRequest() { | 887 buildSetLabelsRequest() { |
888 var o = new api.SetLabelsRequest(); | 888 var o = new api.SetLabelsRequest(); |
889 buildCounterSetLabelsRequest++; | 889 buildCounterSetLabelsRequest++; |
890 if (buildCounterSetLabelsRequest < 3) { | 890 if (buildCounterSetLabelsRequest < 3) { |
891 o.labelFingerprint = "foo"; | 891 o.labelFingerprint = "foo"; |
892 o.resourceLabels = buildUnnamed1728(); | 892 o.resourceLabels = buildUnnamed1738(); |
893 } | 893 } |
894 buildCounterSetLabelsRequest--; | 894 buildCounterSetLabelsRequest--; |
895 return o; | 895 return o; |
896 } | 896 } |
897 | 897 |
898 checkSetLabelsRequest(api.SetLabelsRequest o) { | 898 checkSetLabelsRequest(api.SetLabelsRequest o) { |
899 buildCounterSetLabelsRequest++; | 899 buildCounterSetLabelsRequest++; |
900 if (buildCounterSetLabelsRequest < 3) { | 900 if (buildCounterSetLabelsRequest < 3) { |
901 unittest.expect(o.labelFingerprint, unittest.equals('foo')); | 901 unittest.expect(o.labelFingerprint, unittest.equals('foo')); |
902 checkUnnamed1728(o.resourceLabels); | 902 checkUnnamed1738(o.resourceLabels); |
903 } | 903 } |
904 buildCounterSetLabelsRequest--; | 904 buildCounterSetLabelsRequest--; |
905 } | 905 } |
906 | 906 |
907 core.int buildCounterSetLegacyAbacRequest = 0; | 907 core.int buildCounterSetLegacyAbacRequest = 0; |
908 buildSetLegacyAbacRequest() { | 908 buildSetLegacyAbacRequest() { |
909 var o = new api.SetLegacyAbacRequest(); | 909 var o = new api.SetLegacyAbacRequest(); |
910 buildCounterSetLegacyAbacRequest++; | 910 buildCounterSetLegacyAbacRequest++; |
911 if (buildCounterSetLegacyAbacRequest < 3) { | 911 if (buildCounterSetLegacyAbacRequest < 3) { |
912 o.enabled = true; | 912 o.enabled = true; |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 }); | 1262 }); |
1263 | 1263 |
1264 | 1264 |
1265 unittest.group("resource-ProjectsZonesResourceApi", () { | 1265 unittest.group("resource-ProjectsZonesResourceApi", () { |
1266 unittest.test("method--getServerconfig", () { | 1266 unittest.test("method--getServerconfig", () { |
1267 | 1267 |
1268 var mock = new HttpServerMock(); | 1268 var mock = new HttpServerMock(); |
1269 api.ProjectsZonesResourceApi res = new api.ContainerApi(mock).projects.zon
es; | 1269 api.ProjectsZonesResourceApi res = new api.ContainerApi(mock).projects.zon
es; |
1270 var arg_projectId = "foo"; | 1270 var arg_projectId = "foo"; |
1271 var arg_zone = "foo"; | 1271 var arg_zone = "foo"; |
1272 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1272 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1273 var path = (req.url).path; | 1273 var path = (req.url).path; |
1274 var pathOffset = 0; | 1274 var pathOffset = 0; |
1275 var index; | 1275 var index; |
1276 var subPart; | 1276 var subPart; |
1277 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1277 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1278 pathOffset += 1; | 1278 pathOffset += 1; |
1279 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1279 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1280 pathOffset += 12; | 1280 pathOffset += 12; |
1281 index = path.indexOf("/zones/", pathOffset); | 1281 index = path.indexOf("/zones/", pathOffset); |
1282 unittest.expect(index >= 0, unittest.isTrue); | 1282 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 27 matching lines...) Expand all Loading... |
1310 } | 1310 } |
1311 } | 1311 } |
1312 | 1312 |
1313 | 1313 |
1314 var h = { | 1314 var h = { |
1315 "content-type" : "application/json; charset=utf-8", | 1315 "content-type" : "application/json; charset=utf-8", |
1316 }; | 1316 }; |
1317 var resp = convert.JSON.encode(buildServerConfig()); | 1317 var resp = convert.JSON.encode(buildServerConfig()); |
1318 return new async.Future.value(stringResponse(200, h, resp)); | 1318 return new async.Future.value(stringResponse(200, h, resp)); |
1319 }), true); | 1319 }), true); |
1320 res.getServerconfig(arg_projectId, arg_zone).then(unittest.expectAsync(((a
pi.ServerConfig response) { | 1320 res.getServerconfig(arg_projectId, arg_zone).then(unittest.expectAsync1(((
api.ServerConfig response) { |
1321 checkServerConfig(response); | 1321 checkServerConfig(response); |
1322 }))); | 1322 }))); |
1323 }); | 1323 }); |
1324 | 1324 |
1325 }); | 1325 }); |
1326 | 1326 |
1327 | 1327 |
1328 unittest.group("resource-ProjectsZonesClustersResourceApi", () { | 1328 unittest.group("resource-ProjectsZonesClustersResourceApi", () { |
1329 unittest.test("method--completeIpRotation", () { | 1329 unittest.test("method--completeIpRotation", () { |
1330 | 1330 |
1331 var mock = new HttpServerMock(); | 1331 var mock = new HttpServerMock(); |
1332 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1332 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1333 var arg_request = buildCompleteIPRotationRequest(); | 1333 var arg_request = buildCompleteIPRotationRequest(); |
1334 var arg_projectId = "foo"; | 1334 var arg_projectId = "foo"; |
1335 var arg_zone = "foo"; | 1335 var arg_zone = "foo"; |
1336 var arg_clusterId = "foo"; | 1336 var arg_clusterId = "foo"; |
1337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1337 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1338 var obj = new api.CompleteIPRotationRequest.fromJson(json); | 1338 var obj = new api.CompleteIPRotationRequest.fromJson(json); |
1339 checkCompleteIPRotationRequest(obj); | 1339 checkCompleteIPRotationRequest(obj); |
1340 | 1340 |
1341 var path = (req.url).path; | 1341 var path = (req.url).path; |
1342 var pathOffset = 0; | 1342 var pathOffset = 0; |
1343 var index; | 1343 var index; |
1344 var subPart; | 1344 var subPart; |
1345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1346 pathOffset += 1; | 1346 pathOffset += 1; |
1347 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1347 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 } | 1385 } |
1386 } | 1386 } |
1387 | 1387 |
1388 | 1388 |
1389 var h = { | 1389 var h = { |
1390 "content-type" : "application/json; charset=utf-8", | 1390 "content-type" : "application/json; charset=utf-8", |
1391 }; | 1391 }; |
1392 var resp = convert.JSON.encode(buildOperation()); | 1392 var resp = convert.JSON.encode(buildOperation()); |
1393 return new async.Future.value(stringResponse(200, h, resp)); | 1393 return new async.Future.value(stringResponse(200, h, resp)); |
1394 }), true); | 1394 }), true); |
1395 res.completeIpRotation(arg_request, arg_projectId, arg_zone, arg_clusterId
).then(unittest.expectAsync(((api.Operation response) { | 1395 res.completeIpRotation(arg_request, arg_projectId, arg_zone, arg_clusterId
).then(unittest.expectAsync1(((api.Operation response) { |
1396 checkOperation(response); | 1396 checkOperation(response); |
1397 }))); | 1397 }))); |
1398 }); | 1398 }); |
1399 | 1399 |
1400 unittest.test("method--create", () { | 1400 unittest.test("method--create", () { |
1401 | 1401 |
1402 var mock = new HttpServerMock(); | 1402 var mock = new HttpServerMock(); |
1403 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1403 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1404 var arg_request = buildCreateClusterRequest(); | 1404 var arg_request = buildCreateClusterRequest(); |
1405 var arg_projectId = "foo"; | 1405 var arg_projectId = "foo"; |
1406 var arg_zone = "foo"; | 1406 var arg_zone = "foo"; |
1407 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1407 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1408 var obj = new api.CreateClusterRequest.fromJson(json); | 1408 var obj = new api.CreateClusterRequest.fromJson(json); |
1409 checkCreateClusterRequest(obj); | 1409 checkCreateClusterRequest(obj); |
1410 | 1410 |
1411 var path = (req.url).path; | 1411 var path = (req.url).path; |
1412 var pathOffset = 0; | 1412 var pathOffset = 0; |
1413 var index; | 1413 var index; |
1414 var subPart; | 1414 var subPart; |
1415 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1415 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1416 pathOffset += 1; | 1416 pathOffset += 1; |
1417 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1417 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 30 matching lines...) Expand all Loading... |
1448 } | 1448 } |
1449 } | 1449 } |
1450 | 1450 |
1451 | 1451 |
1452 var h = { | 1452 var h = { |
1453 "content-type" : "application/json; charset=utf-8", | 1453 "content-type" : "application/json; charset=utf-8", |
1454 }; | 1454 }; |
1455 var resp = convert.JSON.encode(buildOperation()); | 1455 var resp = convert.JSON.encode(buildOperation()); |
1456 return new async.Future.value(stringResponse(200, h, resp)); | 1456 return new async.Future.value(stringResponse(200, h, resp)); |
1457 }), true); | 1457 }), true); |
1458 res.create(arg_request, arg_projectId, arg_zone).then(unittest.expectAsync
(((api.Operation response) { | 1458 res.create(arg_request, arg_projectId, arg_zone).then(unittest.expectAsync
1(((api.Operation response) { |
1459 checkOperation(response); | 1459 checkOperation(response); |
1460 }))); | 1460 }))); |
1461 }); | 1461 }); |
1462 | 1462 |
1463 unittest.test("method--delete", () { | 1463 unittest.test("method--delete", () { |
1464 | 1464 |
1465 var mock = new HttpServerMock(); | 1465 var mock = new HttpServerMock(); |
1466 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1466 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1467 var arg_projectId = "foo"; | 1467 var arg_projectId = "foo"; |
1468 var arg_zone = "foo"; | 1468 var arg_zone = "foo"; |
1469 var arg_clusterId = "foo"; | 1469 var arg_clusterId = "foo"; |
1470 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1470 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1471 var path = (req.url).path; | 1471 var path = (req.url).path; |
1472 var pathOffset = 0; | 1472 var pathOffset = 0; |
1473 var index; | 1473 var index; |
1474 var subPart; | 1474 var subPart; |
1475 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1475 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1476 pathOffset += 1; | 1476 pathOffset += 1; |
1477 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1477 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1478 pathOffset += 12; | 1478 pathOffset += 12; |
1479 index = path.indexOf("/zones/", pathOffset); | 1479 index = path.indexOf("/zones/", pathOffset); |
1480 unittest.expect(index >= 0, unittest.isTrue); | 1480 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 30 matching lines...) Expand all Loading... |
1511 } | 1511 } |
1512 } | 1512 } |
1513 | 1513 |
1514 | 1514 |
1515 var h = { | 1515 var h = { |
1516 "content-type" : "application/json; charset=utf-8", | 1516 "content-type" : "application/json; charset=utf-8", |
1517 }; | 1517 }; |
1518 var resp = convert.JSON.encode(buildOperation()); | 1518 var resp = convert.JSON.encode(buildOperation()); |
1519 return new async.Future.value(stringResponse(200, h, resp)); | 1519 return new async.Future.value(stringResponse(200, h, resp)); |
1520 }), true); | 1520 }), true); |
1521 res.delete(arg_projectId, arg_zone, arg_clusterId).then(unittest.expectAsy
nc(((api.Operation response) { | 1521 res.delete(arg_projectId, arg_zone, arg_clusterId).then(unittest.expectAsy
nc1(((api.Operation response) { |
1522 checkOperation(response); | 1522 checkOperation(response); |
1523 }))); | 1523 }))); |
1524 }); | 1524 }); |
1525 | 1525 |
1526 unittest.test("method--get", () { | 1526 unittest.test("method--get", () { |
1527 | 1527 |
1528 var mock = new HttpServerMock(); | 1528 var mock = new HttpServerMock(); |
1529 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1529 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1530 var arg_projectId = "foo"; | 1530 var arg_projectId = "foo"; |
1531 var arg_zone = "foo"; | 1531 var arg_zone = "foo"; |
1532 var arg_clusterId = "foo"; | 1532 var arg_clusterId = "foo"; |
1533 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1533 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1534 var path = (req.url).path; | 1534 var path = (req.url).path; |
1535 var pathOffset = 0; | 1535 var pathOffset = 0; |
1536 var index; | 1536 var index; |
1537 var subPart; | 1537 var subPart; |
1538 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1538 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1539 pathOffset += 1; | 1539 pathOffset += 1; |
1540 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1540 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1541 pathOffset += 12; | 1541 pathOffset += 12; |
1542 index = path.indexOf("/zones/", pathOffset); | 1542 index = path.indexOf("/zones/", pathOffset); |
1543 unittest.expect(index >= 0, unittest.isTrue); | 1543 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 30 matching lines...) Expand all Loading... |
1574 } | 1574 } |
1575 } | 1575 } |
1576 | 1576 |
1577 | 1577 |
1578 var h = { | 1578 var h = { |
1579 "content-type" : "application/json; charset=utf-8", | 1579 "content-type" : "application/json; charset=utf-8", |
1580 }; | 1580 }; |
1581 var resp = convert.JSON.encode(buildCluster()); | 1581 var resp = convert.JSON.encode(buildCluster()); |
1582 return new async.Future.value(stringResponse(200, h, resp)); | 1582 return new async.Future.value(stringResponse(200, h, resp)); |
1583 }), true); | 1583 }), true); |
1584 res.get(arg_projectId, arg_zone, arg_clusterId).then(unittest.expectAsync(
((api.Cluster response) { | 1584 res.get(arg_projectId, arg_zone, arg_clusterId).then(unittest.expectAsync1
(((api.Cluster response) { |
1585 checkCluster(response); | 1585 checkCluster(response); |
1586 }))); | 1586 }))); |
1587 }); | 1587 }); |
1588 | 1588 |
1589 unittest.test("method--legacyAbac", () { | 1589 unittest.test("method--legacyAbac", () { |
1590 | 1590 |
1591 var mock = new HttpServerMock(); | 1591 var mock = new HttpServerMock(); |
1592 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1592 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1593 var arg_request = buildSetLegacyAbacRequest(); | 1593 var arg_request = buildSetLegacyAbacRequest(); |
1594 var arg_projectId = "foo"; | 1594 var arg_projectId = "foo"; |
1595 var arg_zone = "foo"; | 1595 var arg_zone = "foo"; |
1596 var arg_clusterId = "foo"; | 1596 var arg_clusterId = "foo"; |
1597 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1597 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1598 var obj = new api.SetLegacyAbacRequest.fromJson(json); | 1598 var obj = new api.SetLegacyAbacRequest.fromJson(json); |
1599 checkSetLegacyAbacRequest(obj); | 1599 checkSetLegacyAbacRequest(obj); |
1600 | 1600 |
1601 var path = (req.url).path; | 1601 var path = (req.url).path; |
1602 var pathOffset = 0; | 1602 var pathOffset = 0; |
1603 var index; | 1603 var index; |
1604 var subPart; | 1604 var subPart; |
1605 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1605 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1606 pathOffset += 1; | 1606 pathOffset += 1; |
1607 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1607 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 } | 1645 } |
1646 } | 1646 } |
1647 | 1647 |
1648 | 1648 |
1649 var h = { | 1649 var h = { |
1650 "content-type" : "application/json; charset=utf-8", | 1650 "content-type" : "application/json; charset=utf-8", |
1651 }; | 1651 }; |
1652 var resp = convert.JSON.encode(buildOperation()); | 1652 var resp = convert.JSON.encode(buildOperation()); |
1653 return new async.Future.value(stringResponse(200, h, resp)); | 1653 return new async.Future.value(stringResponse(200, h, resp)); |
1654 }), true); | 1654 }), true); |
1655 res.legacyAbac(arg_request, arg_projectId, arg_zone, arg_clusterId).then(u
nittest.expectAsync(((api.Operation response) { | 1655 res.legacyAbac(arg_request, arg_projectId, arg_zone, arg_clusterId).then(u
nittest.expectAsync1(((api.Operation response) { |
1656 checkOperation(response); | 1656 checkOperation(response); |
1657 }))); | 1657 }))); |
1658 }); | 1658 }); |
1659 | 1659 |
1660 unittest.test("method--list", () { | 1660 unittest.test("method--list", () { |
1661 | 1661 |
1662 var mock = new HttpServerMock(); | 1662 var mock = new HttpServerMock(); |
1663 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1663 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1664 var arg_projectId = "foo"; | 1664 var arg_projectId = "foo"; |
1665 var arg_zone = "foo"; | 1665 var arg_zone = "foo"; |
1666 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1666 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1667 var path = (req.url).path; | 1667 var path = (req.url).path; |
1668 var pathOffset = 0; | 1668 var pathOffset = 0; |
1669 var index; | 1669 var index; |
1670 var subPart; | 1670 var subPart; |
1671 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1671 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1672 pathOffset += 1; | 1672 pathOffset += 1; |
1673 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1673 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1674 pathOffset += 12; | 1674 pathOffset += 12; |
1675 index = path.indexOf("/zones/", pathOffset); | 1675 index = path.indexOf("/zones/", pathOffset); |
1676 unittest.expect(index >= 0, unittest.isTrue); | 1676 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 27 matching lines...) Expand all Loading... |
1704 } | 1704 } |
1705 } | 1705 } |
1706 | 1706 |
1707 | 1707 |
1708 var h = { | 1708 var h = { |
1709 "content-type" : "application/json; charset=utf-8", | 1709 "content-type" : "application/json; charset=utf-8", |
1710 }; | 1710 }; |
1711 var resp = convert.JSON.encode(buildListClustersResponse()); | 1711 var resp = convert.JSON.encode(buildListClustersResponse()); |
1712 return new async.Future.value(stringResponse(200, h, resp)); | 1712 return new async.Future.value(stringResponse(200, h, resp)); |
1713 }), true); | 1713 }), true); |
1714 res.list(arg_projectId, arg_zone).then(unittest.expectAsync(((api.ListClus
tersResponse response) { | 1714 res.list(arg_projectId, arg_zone).then(unittest.expectAsync1(((api.ListClu
stersResponse response) { |
1715 checkListClustersResponse(response); | 1715 checkListClustersResponse(response); |
1716 }))); | 1716 }))); |
1717 }); | 1717 }); |
1718 | 1718 |
1719 unittest.test("method--resourceLabels", () { | 1719 unittest.test("method--resourceLabels", () { |
1720 | 1720 |
1721 var mock = new HttpServerMock(); | 1721 var mock = new HttpServerMock(); |
1722 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1722 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1723 var arg_request = buildSetLabelsRequest(); | 1723 var arg_request = buildSetLabelsRequest(); |
1724 var arg_projectId = "foo"; | 1724 var arg_projectId = "foo"; |
1725 var arg_zone = "foo"; | 1725 var arg_zone = "foo"; |
1726 var arg_clusterId = "foo"; | 1726 var arg_clusterId = "foo"; |
1727 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1727 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1728 var obj = new api.SetLabelsRequest.fromJson(json); | 1728 var obj = new api.SetLabelsRequest.fromJson(json); |
1729 checkSetLabelsRequest(obj); | 1729 checkSetLabelsRequest(obj); |
1730 | 1730 |
1731 var path = (req.url).path; | 1731 var path = (req.url).path; |
1732 var pathOffset = 0; | 1732 var pathOffset = 0; |
1733 var index; | 1733 var index; |
1734 var subPart; | 1734 var subPart; |
1735 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1735 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1736 pathOffset += 1; | 1736 pathOffset += 1; |
1737 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1737 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 } | 1775 } |
1776 } | 1776 } |
1777 | 1777 |
1778 | 1778 |
1779 var h = { | 1779 var h = { |
1780 "content-type" : "application/json; charset=utf-8", | 1780 "content-type" : "application/json; charset=utf-8", |
1781 }; | 1781 }; |
1782 var resp = convert.JSON.encode(buildOperation()); | 1782 var resp = convert.JSON.encode(buildOperation()); |
1783 return new async.Future.value(stringResponse(200, h, resp)); | 1783 return new async.Future.value(stringResponse(200, h, resp)); |
1784 }), true); | 1784 }), true); |
1785 res.resourceLabels(arg_request, arg_projectId, arg_zone, arg_clusterId).th
en(unittest.expectAsync(((api.Operation response) { | 1785 res.resourceLabels(arg_request, arg_projectId, arg_zone, arg_clusterId).th
en(unittest.expectAsync1(((api.Operation response) { |
1786 checkOperation(response); | 1786 checkOperation(response); |
1787 }))); | 1787 }))); |
1788 }); | 1788 }); |
1789 | 1789 |
1790 unittest.test("method--setMasterAuth", () { | 1790 unittest.test("method--setMasterAuth", () { |
1791 | 1791 |
1792 var mock = new HttpServerMock(); | 1792 var mock = new HttpServerMock(); |
1793 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1793 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1794 var arg_request = buildSetMasterAuthRequest(); | 1794 var arg_request = buildSetMasterAuthRequest(); |
1795 var arg_projectId = "foo"; | 1795 var arg_projectId = "foo"; |
1796 var arg_zone = "foo"; | 1796 var arg_zone = "foo"; |
1797 var arg_clusterId = "foo"; | 1797 var arg_clusterId = "foo"; |
1798 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1798 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1799 var obj = new api.SetMasterAuthRequest.fromJson(json); | 1799 var obj = new api.SetMasterAuthRequest.fromJson(json); |
1800 checkSetMasterAuthRequest(obj); | 1800 checkSetMasterAuthRequest(obj); |
1801 | 1801 |
1802 var path = (req.url).path; | 1802 var path = (req.url).path; |
1803 var pathOffset = 0; | 1803 var pathOffset = 0; |
1804 var index; | 1804 var index; |
1805 var subPart; | 1805 var subPart; |
1806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1807 pathOffset += 1; | 1807 pathOffset += 1; |
1808 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1808 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 } | 1846 } |
1847 } | 1847 } |
1848 | 1848 |
1849 | 1849 |
1850 var h = { | 1850 var h = { |
1851 "content-type" : "application/json; charset=utf-8", | 1851 "content-type" : "application/json; charset=utf-8", |
1852 }; | 1852 }; |
1853 var resp = convert.JSON.encode(buildOperation()); | 1853 var resp = convert.JSON.encode(buildOperation()); |
1854 return new async.Future.value(stringResponse(200, h, resp)); | 1854 return new async.Future.value(stringResponse(200, h, resp)); |
1855 }), true); | 1855 }), true); |
1856 res.setMasterAuth(arg_request, arg_projectId, arg_zone, arg_clusterId).the
n(unittest.expectAsync(((api.Operation response) { | 1856 res.setMasterAuth(arg_request, arg_projectId, arg_zone, arg_clusterId).the
n(unittest.expectAsync1(((api.Operation response) { |
1857 checkOperation(response); | 1857 checkOperation(response); |
1858 }))); | 1858 }))); |
1859 }); | 1859 }); |
1860 | 1860 |
1861 unittest.test("method--startIpRotation", () { | 1861 unittest.test("method--startIpRotation", () { |
1862 | 1862 |
1863 var mock = new HttpServerMock(); | 1863 var mock = new HttpServerMock(); |
1864 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1864 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1865 var arg_request = buildStartIPRotationRequest(); | 1865 var arg_request = buildStartIPRotationRequest(); |
1866 var arg_projectId = "foo"; | 1866 var arg_projectId = "foo"; |
1867 var arg_zone = "foo"; | 1867 var arg_zone = "foo"; |
1868 var arg_clusterId = "foo"; | 1868 var arg_clusterId = "foo"; |
1869 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1869 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1870 var obj = new api.StartIPRotationRequest.fromJson(json); | 1870 var obj = new api.StartIPRotationRequest.fromJson(json); |
1871 checkStartIPRotationRequest(obj); | 1871 checkStartIPRotationRequest(obj); |
1872 | 1872 |
1873 var path = (req.url).path; | 1873 var path = (req.url).path; |
1874 var pathOffset = 0; | 1874 var pathOffset = 0; |
1875 var index; | 1875 var index; |
1876 var subPart; | 1876 var subPart; |
1877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1878 pathOffset += 1; | 1878 pathOffset += 1; |
1879 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1879 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 } | 1917 } |
1918 } | 1918 } |
1919 | 1919 |
1920 | 1920 |
1921 var h = { | 1921 var h = { |
1922 "content-type" : "application/json; charset=utf-8", | 1922 "content-type" : "application/json; charset=utf-8", |
1923 }; | 1923 }; |
1924 var resp = convert.JSON.encode(buildOperation()); | 1924 var resp = convert.JSON.encode(buildOperation()); |
1925 return new async.Future.value(stringResponse(200, h, resp)); | 1925 return new async.Future.value(stringResponse(200, h, resp)); |
1926 }), true); | 1926 }), true); |
1927 res.startIpRotation(arg_request, arg_projectId, arg_zone, arg_clusterId).t
hen(unittest.expectAsync(((api.Operation response) { | 1927 res.startIpRotation(arg_request, arg_projectId, arg_zone, arg_clusterId).t
hen(unittest.expectAsync1(((api.Operation response) { |
1928 checkOperation(response); | 1928 checkOperation(response); |
1929 }))); | 1929 }))); |
1930 }); | 1930 }); |
1931 | 1931 |
1932 unittest.test("method--update", () { | 1932 unittest.test("method--update", () { |
1933 | 1933 |
1934 var mock = new HttpServerMock(); | 1934 var mock = new HttpServerMock(); |
1935 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1935 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1936 var arg_request = buildUpdateClusterRequest(); | 1936 var arg_request = buildUpdateClusterRequest(); |
1937 var arg_projectId = "foo"; | 1937 var arg_projectId = "foo"; |
1938 var arg_zone = "foo"; | 1938 var arg_zone = "foo"; |
1939 var arg_clusterId = "foo"; | 1939 var arg_clusterId = "foo"; |
1940 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1940 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1941 var obj = new api.UpdateClusterRequest.fromJson(json); | 1941 var obj = new api.UpdateClusterRequest.fromJson(json); |
1942 checkUpdateClusterRequest(obj); | 1942 checkUpdateClusterRequest(obj); |
1943 | 1943 |
1944 var path = (req.url).path; | 1944 var path = (req.url).path; |
1945 var pathOffset = 0; | 1945 var pathOffset = 0; |
1946 var index; | 1946 var index; |
1947 var subPart; | 1947 var subPart; |
1948 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1948 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1949 pathOffset += 1; | 1949 pathOffset += 1; |
1950 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1950 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 } | 1984 } |
1985 } | 1985 } |
1986 | 1986 |
1987 | 1987 |
1988 var h = { | 1988 var h = { |
1989 "content-type" : "application/json; charset=utf-8", | 1989 "content-type" : "application/json; charset=utf-8", |
1990 }; | 1990 }; |
1991 var resp = convert.JSON.encode(buildOperation()); | 1991 var resp = convert.JSON.encode(buildOperation()); |
1992 return new async.Future.value(stringResponse(200, h, resp)); | 1992 return new async.Future.value(stringResponse(200, h, resp)); |
1993 }), true); | 1993 }), true); |
1994 res.update(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync(((api.Operation response) { | 1994 res.update(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync1(((api.Operation response) { |
1995 checkOperation(response); | 1995 checkOperation(response); |
1996 }))); | 1996 }))); |
1997 }); | 1997 }); |
1998 | 1998 |
1999 }); | 1999 }); |
2000 | 2000 |
2001 | 2001 |
2002 unittest.group("resource-ProjectsZonesClustersNodePoolsResourceApi", () { | 2002 unittest.group("resource-ProjectsZonesClustersNodePoolsResourceApi", () { |
2003 unittest.test("method--create", () { | 2003 unittest.test("method--create", () { |
2004 | 2004 |
2005 var mock = new HttpServerMock(); | 2005 var mock = new HttpServerMock(); |
2006 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2006 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2007 var arg_request = buildCreateNodePoolRequest(); | 2007 var arg_request = buildCreateNodePoolRequest(); |
2008 var arg_projectId = "foo"; | 2008 var arg_projectId = "foo"; |
2009 var arg_zone = "foo"; | 2009 var arg_zone = "foo"; |
2010 var arg_clusterId = "foo"; | 2010 var arg_clusterId = "foo"; |
2011 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2011 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2012 var obj = new api.CreateNodePoolRequest.fromJson(json); | 2012 var obj = new api.CreateNodePoolRequest.fromJson(json); |
2013 checkCreateNodePoolRequest(obj); | 2013 checkCreateNodePoolRequest(obj); |
2014 | 2014 |
2015 var path = (req.url).path; | 2015 var path = (req.url).path; |
2016 var pathOffset = 0; | 2016 var pathOffset = 0; |
2017 var index; | 2017 var index; |
2018 var subPart; | 2018 var subPart; |
2019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2020 pathOffset += 1; | 2020 pathOffset += 1; |
2021 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2021 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 } | 2059 } |
2060 } | 2060 } |
2061 | 2061 |
2062 | 2062 |
2063 var h = { | 2063 var h = { |
2064 "content-type" : "application/json; charset=utf-8", | 2064 "content-type" : "application/json; charset=utf-8", |
2065 }; | 2065 }; |
2066 var resp = convert.JSON.encode(buildOperation()); | 2066 var resp = convert.JSON.encode(buildOperation()); |
2067 return new async.Future.value(stringResponse(200, h, resp)); | 2067 return new async.Future.value(stringResponse(200, h, resp)); |
2068 }), true); | 2068 }), true); |
2069 res.create(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync(((api.Operation response) { | 2069 res.create(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync1(((api.Operation response) { |
2070 checkOperation(response); | 2070 checkOperation(response); |
2071 }))); | 2071 }))); |
2072 }); | 2072 }); |
2073 | 2073 |
2074 unittest.test("method--delete", () { | 2074 unittest.test("method--delete", () { |
2075 | 2075 |
2076 var mock = new HttpServerMock(); | 2076 var mock = new HttpServerMock(); |
2077 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2077 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2078 var arg_projectId = "foo"; | 2078 var arg_projectId = "foo"; |
2079 var arg_zone = "foo"; | 2079 var arg_zone = "foo"; |
2080 var arg_clusterId = "foo"; | 2080 var arg_clusterId = "foo"; |
2081 var arg_nodePoolId = "foo"; | 2081 var arg_nodePoolId = "foo"; |
2082 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2082 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2083 var path = (req.url).path; | 2083 var path = (req.url).path; |
2084 var pathOffset = 0; | 2084 var pathOffset = 0; |
2085 var index; | 2085 var index; |
2086 var subPart; | 2086 var subPart; |
2087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2088 pathOffset += 1; | 2088 pathOffset += 1; |
2089 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2089 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
2090 pathOffset += 12; | 2090 pathOffset += 12; |
2091 index = path.indexOf("/zones/", pathOffset); | 2091 index = path.indexOf("/zones/", pathOffset); |
2092 unittest.expect(index >= 0, unittest.isTrue); | 2092 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 } | 2130 } |
2131 } | 2131 } |
2132 | 2132 |
2133 | 2133 |
2134 var h = { | 2134 var h = { |
2135 "content-type" : "application/json; charset=utf-8", | 2135 "content-type" : "application/json; charset=utf-8", |
2136 }; | 2136 }; |
2137 var resp = convert.JSON.encode(buildOperation()); | 2137 var resp = convert.JSON.encode(buildOperation()); |
2138 return new async.Future.value(stringResponse(200, h, resp)); | 2138 return new async.Future.value(stringResponse(200, h, resp)); |
2139 }), true); | 2139 }), true); |
2140 res.delete(arg_projectId, arg_zone, arg_clusterId, arg_nodePoolId).then(un
ittest.expectAsync(((api.Operation response) { | 2140 res.delete(arg_projectId, arg_zone, arg_clusterId, arg_nodePoolId).then(un
ittest.expectAsync1(((api.Operation response) { |
2141 checkOperation(response); | 2141 checkOperation(response); |
2142 }))); | 2142 }))); |
2143 }); | 2143 }); |
2144 | 2144 |
2145 unittest.test("method--get", () { | 2145 unittest.test("method--get", () { |
2146 | 2146 |
2147 var mock = new HttpServerMock(); | 2147 var mock = new HttpServerMock(); |
2148 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2148 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2149 var arg_projectId = "foo"; | 2149 var arg_projectId = "foo"; |
2150 var arg_zone = "foo"; | 2150 var arg_zone = "foo"; |
2151 var arg_clusterId = "foo"; | 2151 var arg_clusterId = "foo"; |
2152 var arg_nodePoolId = "foo"; | 2152 var arg_nodePoolId = "foo"; |
2153 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2153 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2154 var path = (req.url).path; | 2154 var path = (req.url).path; |
2155 var pathOffset = 0; | 2155 var pathOffset = 0; |
2156 var index; | 2156 var index; |
2157 var subPart; | 2157 var subPart; |
2158 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2158 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2159 pathOffset += 1; | 2159 pathOffset += 1; |
2160 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2160 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
2161 pathOffset += 12; | 2161 pathOffset += 12; |
2162 index = path.indexOf("/zones/", pathOffset); | 2162 index = path.indexOf("/zones/", pathOffset); |
2163 unittest.expect(index >= 0, unittest.isTrue); | 2163 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 } | 2201 } |
2202 } | 2202 } |
2203 | 2203 |
2204 | 2204 |
2205 var h = { | 2205 var h = { |
2206 "content-type" : "application/json; charset=utf-8", | 2206 "content-type" : "application/json; charset=utf-8", |
2207 }; | 2207 }; |
2208 var resp = convert.JSON.encode(buildNodePool()); | 2208 var resp = convert.JSON.encode(buildNodePool()); |
2209 return new async.Future.value(stringResponse(200, h, resp)); | 2209 return new async.Future.value(stringResponse(200, h, resp)); |
2210 }), true); | 2210 }), true); |
2211 res.get(arg_projectId, arg_zone, arg_clusterId, arg_nodePoolId).then(unitt
est.expectAsync(((api.NodePool response) { | 2211 res.get(arg_projectId, arg_zone, arg_clusterId, arg_nodePoolId).then(unitt
est.expectAsync1(((api.NodePool response) { |
2212 checkNodePool(response); | 2212 checkNodePool(response); |
2213 }))); | 2213 }))); |
2214 }); | 2214 }); |
2215 | 2215 |
2216 unittest.test("method--list", () { | 2216 unittest.test("method--list", () { |
2217 | 2217 |
2218 var mock = new HttpServerMock(); | 2218 var mock = new HttpServerMock(); |
2219 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2219 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2220 var arg_projectId = "foo"; | 2220 var arg_projectId = "foo"; |
2221 var arg_zone = "foo"; | 2221 var arg_zone = "foo"; |
2222 var arg_clusterId = "foo"; | 2222 var arg_clusterId = "foo"; |
2223 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2223 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2224 var path = (req.url).path; | 2224 var path = (req.url).path; |
2225 var pathOffset = 0; | 2225 var pathOffset = 0; |
2226 var index; | 2226 var index; |
2227 var subPart; | 2227 var subPart; |
2228 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2228 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2229 pathOffset += 1; | 2229 pathOffset += 1; |
2230 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2230 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
2231 pathOffset += 12; | 2231 pathOffset += 12; |
2232 index = path.indexOf("/zones/", pathOffset); | 2232 index = path.indexOf("/zones/", pathOffset); |
2233 unittest.expect(index >= 0, unittest.isTrue); | 2233 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2268 } | 2268 } |
2269 } | 2269 } |
2270 | 2270 |
2271 | 2271 |
2272 var h = { | 2272 var h = { |
2273 "content-type" : "application/json; charset=utf-8", | 2273 "content-type" : "application/json; charset=utf-8", |
2274 }; | 2274 }; |
2275 var resp = convert.JSON.encode(buildListNodePoolsResponse()); | 2275 var resp = convert.JSON.encode(buildListNodePoolsResponse()); |
2276 return new async.Future.value(stringResponse(200, h, resp)); | 2276 return new async.Future.value(stringResponse(200, h, resp)); |
2277 }), true); | 2277 }), true); |
2278 res.list(arg_projectId, arg_zone, arg_clusterId).then(unittest.expectAsync
(((api.ListNodePoolsResponse response) { | 2278 res.list(arg_projectId, arg_zone, arg_clusterId).then(unittest.expectAsync
1(((api.ListNodePoolsResponse response) { |
2279 checkListNodePoolsResponse(response); | 2279 checkListNodePoolsResponse(response); |
2280 }))); | 2280 }))); |
2281 }); | 2281 }); |
2282 | 2282 |
2283 unittest.test("method--rollback", () { | 2283 unittest.test("method--rollback", () { |
2284 | 2284 |
2285 var mock = new HttpServerMock(); | 2285 var mock = new HttpServerMock(); |
2286 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2286 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2287 var arg_request = buildRollbackNodePoolUpgradeRequest(); | 2287 var arg_request = buildRollbackNodePoolUpgradeRequest(); |
2288 var arg_projectId = "foo"; | 2288 var arg_projectId = "foo"; |
2289 var arg_zone = "foo"; | 2289 var arg_zone = "foo"; |
2290 var arg_clusterId = "foo"; | 2290 var arg_clusterId = "foo"; |
2291 var arg_nodePoolId = "foo"; | 2291 var arg_nodePoolId = "foo"; |
2292 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2292 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2293 var obj = new api.RollbackNodePoolUpgradeRequest.fromJson(json); | 2293 var obj = new api.RollbackNodePoolUpgradeRequest.fromJson(json); |
2294 checkRollbackNodePoolUpgradeRequest(obj); | 2294 checkRollbackNodePoolUpgradeRequest(obj); |
2295 | 2295 |
2296 var path = (req.url).path; | 2296 var path = (req.url).path; |
2297 var pathOffset = 0; | 2297 var pathOffset = 0; |
2298 var index; | 2298 var index; |
2299 var subPart; | 2299 var subPart; |
2300 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2300 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2301 pathOffset += 1; | 2301 pathOffset += 1; |
2302 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2302 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 } | 2347 } |
2348 } | 2348 } |
2349 | 2349 |
2350 | 2350 |
2351 var h = { | 2351 var h = { |
2352 "content-type" : "application/json; charset=utf-8", | 2352 "content-type" : "application/json; charset=utf-8", |
2353 }; | 2353 }; |
2354 var resp = convert.JSON.encode(buildOperation()); | 2354 var resp = convert.JSON.encode(buildOperation()); |
2355 return new async.Future.value(stringResponse(200, h, resp)); | 2355 return new async.Future.value(stringResponse(200, h, resp)); |
2356 }), true); | 2356 }), true); |
2357 res.rollback(arg_request, arg_projectId, arg_zone, arg_clusterId, arg_node
PoolId).then(unittest.expectAsync(((api.Operation response) { | 2357 res.rollback(arg_request, arg_projectId, arg_zone, arg_clusterId, arg_node
PoolId).then(unittest.expectAsync1(((api.Operation response) { |
2358 checkOperation(response); | 2358 checkOperation(response); |
2359 }))); | 2359 }))); |
2360 }); | 2360 }); |
2361 | 2361 |
2362 unittest.test("method--setManagement", () { | 2362 unittest.test("method--setManagement", () { |
2363 | 2363 |
2364 var mock = new HttpServerMock(); | 2364 var mock = new HttpServerMock(); |
2365 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2365 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2366 var arg_request = buildSetNodePoolManagementRequest(); | 2366 var arg_request = buildSetNodePoolManagementRequest(); |
2367 var arg_projectId = "foo"; | 2367 var arg_projectId = "foo"; |
2368 var arg_zone = "foo"; | 2368 var arg_zone = "foo"; |
2369 var arg_clusterId = "foo"; | 2369 var arg_clusterId = "foo"; |
2370 var arg_nodePoolId = "foo"; | 2370 var arg_nodePoolId = "foo"; |
2371 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2371 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2372 var obj = new api.SetNodePoolManagementRequest.fromJson(json); | 2372 var obj = new api.SetNodePoolManagementRequest.fromJson(json); |
2373 checkSetNodePoolManagementRequest(obj); | 2373 checkSetNodePoolManagementRequest(obj); |
2374 | 2374 |
2375 var path = (req.url).path; | 2375 var path = (req.url).path; |
2376 var pathOffset = 0; | 2376 var pathOffset = 0; |
2377 var index; | 2377 var index; |
2378 var subPart; | 2378 var subPart; |
2379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2380 pathOffset += 1; | 2380 pathOffset += 1; |
2381 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2381 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2426 } | 2426 } |
2427 } | 2427 } |
2428 | 2428 |
2429 | 2429 |
2430 var h = { | 2430 var h = { |
2431 "content-type" : "application/json; charset=utf-8", | 2431 "content-type" : "application/json; charset=utf-8", |
2432 }; | 2432 }; |
2433 var resp = convert.JSON.encode(buildOperation()); | 2433 var resp = convert.JSON.encode(buildOperation()); |
2434 return new async.Future.value(stringResponse(200, h, resp)); | 2434 return new async.Future.value(stringResponse(200, h, resp)); |
2435 }), true); | 2435 }), true); |
2436 res.setManagement(arg_request, arg_projectId, arg_zone, arg_clusterId, arg
_nodePoolId).then(unittest.expectAsync(((api.Operation response) { | 2436 res.setManagement(arg_request, arg_projectId, arg_zone, arg_clusterId, arg
_nodePoolId).then(unittest.expectAsync1(((api.Operation response) { |
2437 checkOperation(response); | 2437 checkOperation(response); |
2438 }))); | 2438 }))); |
2439 }); | 2439 }); |
2440 | 2440 |
2441 }); | 2441 }); |
2442 | 2442 |
2443 | 2443 |
2444 unittest.group("resource-ProjectsZonesOperationsResourceApi", () { | 2444 unittest.group("resource-ProjectsZonesOperationsResourceApi", () { |
2445 unittest.test("method--cancel", () { | 2445 unittest.test("method--cancel", () { |
2446 | 2446 |
2447 var mock = new HttpServerMock(); | 2447 var mock = new HttpServerMock(); |
2448 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; | 2448 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; |
2449 var arg_request = buildCancelOperationRequest(); | 2449 var arg_request = buildCancelOperationRequest(); |
2450 var arg_projectId = "foo"; | 2450 var arg_projectId = "foo"; |
2451 var arg_zone = "foo"; | 2451 var arg_zone = "foo"; |
2452 var arg_operationId = "foo"; | 2452 var arg_operationId = "foo"; |
2453 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2453 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2454 var obj = new api.CancelOperationRequest.fromJson(json); | 2454 var obj = new api.CancelOperationRequest.fromJson(json); |
2455 checkCancelOperationRequest(obj); | 2455 checkCancelOperationRequest(obj); |
2456 | 2456 |
2457 var path = (req.url).path; | 2457 var path = (req.url).path; |
2458 var pathOffset = 0; | 2458 var pathOffset = 0; |
2459 var index; | 2459 var index; |
2460 var subPart; | 2460 var subPart; |
2461 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2461 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2462 pathOffset += 1; | 2462 pathOffset += 1; |
2463 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2463 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2501 } | 2501 } |
2502 } | 2502 } |
2503 | 2503 |
2504 | 2504 |
2505 var h = { | 2505 var h = { |
2506 "content-type" : "application/json; charset=utf-8", | 2506 "content-type" : "application/json; charset=utf-8", |
2507 }; | 2507 }; |
2508 var resp = convert.JSON.encode(buildEmpty()); | 2508 var resp = convert.JSON.encode(buildEmpty()); |
2509 return new async.Future.value(stringResponse(200, h, resp)); | 2509 return new async.Future.value(stringResponse(200, h, resp)); |
2510 }), true); | 2510 }), true); |
2511 res.cancel(arg_request, arg_projectId, arg_zone, arg_operationId).then(uni
ttest.expectAsync(((api.Empty response) { | 2511 res.cancel(arg_request, arg_projectId, arg_zone, arg_operationId).then(uni
ttest.expectAsync1(((api.Empty response) { |
2512 checkEmpty(response); | 2512 checkEmpty(response); |
2513 }))); | 2513 }))); |
2514 }); | 2514 }); |
2515 | 2515 |
2516 unittest.test("method--get", () { | 2516 unittest.test("method--get", () { |
2517 | 2517 |
2518 var mock = new HttpServerMock(); | 2518 var mock = new HttpServerMock(); |
2519 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; | 2519 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; |
2520 var arg_projectId = "foo"; | 2520 var arg_projectId = "foo"; |
2521 var arg_zone = "foo"; | 2521 var arg_zone = "foo"; |
2522 var arg_operationId = "foo"; | 2522 var arg_operationId = "foo"; |
2523 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2523 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2524 var path = (req.url).path; | 2524 var path = (req.url).path; |
2525 var pathOffset = 0; | 2525 var pathOffset = 0; |
2526 var index; | 2526 var index; |
2527 var subPart; | 2527 var subPart; |
2528 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2528 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2529 pathOffset += 1; | 2529 pathOffset += 1; |
2530 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2530 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
2531 pathOffset += 12; | 2531 pathOffset += 12; |
2532 index = path.indexOf("/zones/", pathOffset); | 2532 index = path.indexOf("/zones/", pathOffset); |
2533 unittest.expect(index >= 0, unittest.isTrue); | 2533 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 30 matching lines...) Expand all Loading... |
2564 } | 2564 } |
2565 } | 2565 } |
2566 | 2566 |
2567 | 2567 |
2568 var h = { | 2568 var h = { |
2569 "content-type" : "application/json; charset=utf-8", | 2569 "content-type" : "application/json; charset=utf-8", |
2570 }; | 2570 }; |
2571 var resp = convert.JSON.encode(buildOperation()); | 2571 var resp = convert.JSON.encode(buildOperation()); |
2572 return new async.Future.value(stringResponse(200, h, resp)); | 2572 return new async.Future.value(stringResponse(200, h, resp)); |
2573 }), true); | 2573 }), true); |
2574 res.get(arg_projectId, arg_zone, arg_operationId).then(unittest.expectAsyn
c(((api.Operation response) { | 2574 res.get(arg_projectId, arg_zone, arg_operationId).then(unittest.expectAsyn
c1(((api.Operation response) { |
2575 checkOperation(response); | 2575 checkOperation(response); |
2576 }))); | 2576 }))); |
2577 }); | 2577 }); |
2578 | 2578 |
2579 unittest.test("method--list", () { | 2579 unittest.test("method--list", () { |
2580 | 2580 |
2581 var mock = new HttpServerMock(); | 2581 var mock = new HttpServerMock(); |
2582 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; | 2582 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; |
2583 var arg_projectId = "foo"; | 2583 var arg_projectId = "foo"; |
2584 var arg_zone = "foo"; | 2584 var arg_zone = "foo"; |
2585 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2585 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2586 var path = (req.url).path; | 2586 var path = (req.url).path; |
2587 var pathOffset = 0; | 2587 var pathOffset = 0; |
2588 var index; | 2588 var index; |
2589 var subPart; | 2589 var subPart; |
2590 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2590 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2591 pathOffset += 1; | 2591 pathOffset += 1; |
2592 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2592 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
2593 pathOffset += 12; | 2593 pathOffset += 12; |
2594 index = path.indexOf("/zones/", pathOffset); | 2594 index = path.indexOf("/zones/", pathOffset); |
2595 unittest.expect(index >= 0, unittest.isTrue); | 2595 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 27 matching lines...) Expand all Loading... |
2623 } | 2623 } |
2624 } | 2624 } |
2625 | 2625 |
2626 | 2626 |
2627 var h = { | 2627 var h = { |
2628 "content-type" : "application/json; charset=utf-8", | 2628 "content-type" : "application/json; charset=utf-8", |
2629 }; | 2629 }; |
2630 var resp = convert.JSON.encode(buildListOperationsResponse()); | 2630 var resp = convert.JSON.encode(buildListOperationsResponse()); |
2631 return new async.Future.value(stringResponse(200, h, resp)); | 2631 return new async.Future.value(stringResponse(200, h, resp)); |
2632 }), true); | 2632 }), true); |
2633 res.list(arg_projectId, arg_zone).then(unittest.expectAsync(((api.ListOper
ationsResponse response) { | 2633 res.list(arg_projectId, arg_zone).then(unittest.expectAsync1(((api.ListOpe
rationsResponse response) { |
2634 checkListOperationsResponse(response); | 2634 checkListOperationsResponse(response); |
2635 }))); | 2635 }))); |
2636 }); | 2636 }); |
2637 | 2637 |
2638 }); | 2638 }); |
2639 | 2639 |
2640 | 2640 |
2641 } | 2641 } |
2642 | 2642 |
OLD | NEW |