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:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 92 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 buildUnnamed1720() { | 113 core.int buildCounterClientCertificateConfig = 0; |
| 114 buildClientCertificateConfig() { |
| 115 var o = new api.ClientCertificateConfig(); |
| 116 buildCounterClientCertificateConfig++; |
| 117 if (buildCounterClientCertificateConfig < 3) { |
| 118 o.issueClientCertificate = true; |
| 119 } |
| 120 buildCounterClientCertificateConfig--; |
| 121 return o; |
| 122 } |
| 123 |
| 124 checkClientCertificateConfig(api.ClientCertificateConfig o) { |
| 125 buildCounterClientCertificateConfig++; |
| 126 if (buildCounterClientCertificateConfig < 3) { |
| 127 unittest.expect(o.issueClientCertificate, unittest.isTrue); |
| 128 } |
| 129 buildCounterClientCertificateConfig--; |
| 130 } |
| 131 |
| 132 buildUnnamed1814() { |
114 var o = new core.List<core.String>(); | 133 var o = new core.List<core.String>(); |
115 o.add("foo"); | 134 o.add("foo"); |
116 o.add("foo"); | 135 o.add("foo"); |
117 return o; | 136 return o; |
118 } | 137 } |
119 | 138 |
120 checkUnnamed1720(core.List<core.String> o) { | 139 checkUnnamed1814(core.List<core.String> o) { |
121 unittest.expect(o, unittest.hasLength(2)); | 140 unittest.expect(o, unittest.hasLength(2)); |
122 unittest.expect(o[0], unittest.equals('foo')); | 141 unittest.expect(o[0], unittest.equals('foo')); |
123 unittest.expect(o[1], unittest.equals('foo')); | 142 unittest.expect(o[1], unittest.equals('foo')); |
124 } | 143 } |
125 | 144 |
126 buildUnnamed1721() { | 145 buildUnnamed1815() { |
127 var o = new core.List<core.String>(); | 146 var o = new core.List<core.String>(); |
128 o.add("foo"); | 147 o.add("foo"); |
129 o.add("foo"); | 148 o.add("foo"); |
130 return o; | 149 return o; |
131 } | 150 } |
132 | 151 |
133 checkUnnamed1721(core.List<core.String> o) { | 152 checkUnnamed1815(core.List<core.String> o) { |
134 unittest.expect(o, unittest.hasLength(2)); | 153 unittest.expect(o, unittest.hasLength(2)); |
135 unittest.expect(o[0], unittest.equals('foo')); | 154 unittest.expect(o[0], unittest.equals('foo')); |
136 unittest.expect(o[1], unittest.equals('foo')); | 155 unittest.expect(o[1], unittest.equals('foo')); |
137 } | 156 } |
138 | 157 |
139 buildUnnamed1722() { | 158 buildUnnamed1816() { |
140 var o = new core.List<api.NodePool>(); | 159 var o = new core.List<api.NodePool>(); |
141 o.add(buildNodePool()); | 160 o.add(buildNodePool()); |
142 o.add(buildNodePool()); | 161 o.add(buildNodePool()); |
143 return o; | 162 return o; |
144 } | 163 } |
145 | 164 |
146 checkUnnamed1722(core.List<api.NodePool> o) { | 165 checkUnnamed1816(core.List<api.NodePool> o) { |
147 unittest.expect(o, unittest.hasLength(2)); | 166 unittest.expect(o, unittest.hasLength(2)); |
148 checkNodePool(o[0]); | 167 checkNodePool(o[0]); |
149 checkNodePool(o[1]); | 168 checkNodePool(o[1]); |
150 } | 169 } |
151 | 170 |
152 buildUnnamed1723() { | 171 buildUnnamed1817() { |
153 var o = new core.Map<core.String, core.String>(); | 172 var o = new core.Map<core.String, core.String>(); |
154 o["x"] = "foo"; | 173 o["x"] = "foo"; |
155 o["y"] = "foo"; | 174 o["y"] = "foo"; |
156 return o; | 175 return o; |
157 } | 176 } |
158 | 177 |
159 checkUnnamed1723(core.Map<core.String, core.String> o) { | 178 checkUnnamed1817(core.Map<core.String, core.String> o) { |
160 unittest.expect(o, unittest.hasLength(2)); | 179 unittest.expect(o, unittest.hasLength(2)); |
161 unittest.expect(o["x"], unittest.equals('foo')); | 180 unittest.expect(o["x"], unittest.equals('foo')); |
162 unittest.expect(o["y"], unittest.equals('foo')); | 181 unittest.expect(o["y"], unittest.equals('foo')); |
163 } | 182 } |
164 | 183 |
165 core.int buildCounterCluster = 0; | 184 core.int buildCounterCluster = 0; |
166 buildCluster() { | 185 buildCluster() { |
167 var o = new api.Cluster(); | 186 var o = new api.Cluster(); |
168 buildCounterCluster++; | 187 buildCounterCluster++; |
169 if (buildCounterCluster < 3) { | 188 if (buildCounterCluster < 3) { |
170 o.addonsConfig = buildAddonsConfig(); | 189 o.addonsConfig = buildAddonsConfig(); |
171 o.clusterIpv4Cidr = "foo"; | 190 o.clusterIpv4Cidr = "foo"; |
172 o.createTime = "foo"; | 191 o.createTime = "foo"; |
173 o.currentMasterVersion = "foo"; | 192 o.currentMasterVersion = "foo"; |
174 o.currentNodeCount = 42; | 193 o.currentNodeCount = 42; |
175 o.currentNodeVersion = "foo"; | 194 o.currentNodeVersion = "foo"; |
176 o.description = "foo"; | 195 o.description = "foo"; |
177 o.enableKubernetesAlpha = true; | 196 o.enableKubernetesAlpha = true; |
178 o.endpoint = "foo"; | 197 o.endpoint = "foo"; |
179 o.expireTime = "foo"; | 198 o.expireTime = "foo"; |
180 o.initialClusterVersion = "foo"; | 199 o.initialClusterVersion = "foo"; |
181 o.initialNodeCount = 42; | 200 o.initialNodeCount = 42; |
182 o.instanceGroupUrls = buildUnnamed1720(); | 201 o.instanceGroupUrls = buildUnnamed1814(); |
| 202 o.ipAllocationPolicy = buildIPAllocationPolicy(); |
183 o.labelFingerprint = "foo"; | 203 o.labelFingerprint = "foo"; |
184 o.legacyAbac = buildLegacyAbac(); | 204 o.legacyAbac = buildLegacyAbac(); |
185 o.locations = buildUnnamed1721(); | 205 o.locations = buildUnnamed1815(); |
186 o.loggingService = "foo"; | 206 o.loggingService = "foo"; |
187 o.masterAuth = buildMasterAuth(); | 207 o.masterAuth = buildMasterAuth(); |
188 o.monitoringService = "foo"; | 208 o.monitoringService = "foo"; |
189 o.name = "foo"; | 209 o.name = "foo"; |
190 o.network = "foo"; | 210 o.network = "foo"; |
| 211 o.networkPolicy = buildNetworkPolicy(); |
191 o.nodeConfig = buildNodeConfig(); | 212 o.nodeConfig = buildNodeConfig(); |
192 o.nodeIpv4CidrSize = 42; | 213 o.nodeIpv4CidrSize = 42; |
193 o.nodePools = buildUnnamed1722(); | 214 o.nodePools = buildUnnamed1816(); |
194 o.resourceLabels = buildUnnamed1723(); | 215 o.resourceLabels = buildUnnamed1817(); |
195 o.selfLink = "foo"; | 216 o.selfLink = "foo"; |
196 o.servicesIpv4Cidr = "foo"; | 217 o.servicesIpv4Cidr = "foo"; |
197 o.status = "foo"; | 218 o.status = "foo"; |
198 o.statusMessage = "foo"; | 219 o.statusMessage = "foo"; |
199 o.subnetwork = "foo"; | 220 o.subnetwork = "foo"; |
200 o.zone = "foo"; | 221 o.zone = "foo"; |
201 } | 222 } |
202 buildCounterCluster--; | 223 buildCounterCluster--; |
203 return o; | 224 return o; |
204 } | 225 } |
205 | 226 |
206 checkCluster(api.Cluster o) { | 227 checkCluster(api.Cluster o) { |
207 buildCounterCluster++; | 228 buildCounterCluster++; |
208 if (buildCounterCluster < 3) { | 229 if (buildCounterCluster < 3) { |
209 checkAddonsConfig(o.addonsConfig); | 230 checkAddonsConfig(o.addonsConfig); |
210 unittest.expect(o.clusterIpv4Cidr, unittest.equals('foo')); | 231 unittest.expect(o.clusterIpv4Cidr, unittest.equals('foo')); |
211 unittest.expect(o.createTime, unittest.equals('foo')); | 232 unittest.expect(o.createTime, unittest.equals('foo')); |
212 unittest.expect(o.currentMasterVersion, unittest.equals('foo')); | 233 unittest.expect(o.currentMasterVersion, unittest.equals('foo')); |
213 unittest.expect(o.currentNodeCount, unittest.equals(42)); | 234 unittest.expect(o.currentNodeCount, unittest.equals(42)); |
214 unittest.expect(o.currentNodeVersion, unittest.equals('foo')); | 235 unittest.expect(o.currentNodeVersion, unittest.equals('foo')); |
215 unittest.expect(o.description, unittest.equals('foo')); | 236 unittest.expect(o.description, unittest.equals('foo')); |
216 unittest.expect(o.enableKubernetesAlpha, unittest.isTrue); | 237 unittest.expect(o.enableKubernetesAlpha, unittest.isTrue); |
217 unittest.expect(o.endpoint, unittest.equals('foo')); | 238 unittest.expect(o.endpoint, unittest.equals('foo')); |
218 unittest.expect(o.expireTime, unittest.equals('foo')); | 239 unittest.expect(o.expireTime, unittest.equals('foo')); |
219 unittest.expect(o.initialClusterVersion, unittest.equals('foo')); | 240 unittest.expect(o.initialClusterVersion, unittest.equals('foo')); |
220 unittest.expect(o.initialNodeCount, unittest.equals(42)); | 241 unittest.expect(o.initialNodeCount, unittest.equals(42)); |
221 checkUnnamed1720(o.instanceGroupUrls); | 242 checkUnnamed1814(o.instanceGroupUrls); |
| 243 checkIPAllocationPolicy(o.ipAllocationPolicy); |
222 unittest.expect(o.labelFingerprint, unittest.equals('foo')); | 244 unittest.expect(o.labelFingerprint, unittest.equals('foo')); |
223 checkLegacyAbac(o.legacyAbac); | 245 checkLegacyAbac(o.legacyAbac); |
224 checkUnnamed1721(o.locations); | 246 checkUnnamed1815(o.locations); |
225 unittest.expect(o.loggingService, unittest.equals('foo')); | 247 unittest.expect(o.loggingService, unittest.equals('foo')); |
226 checkMasterAuth(o.masterAuth); | 248 checkMasterAuth(o.masterAuth); |
227 unittest.expect(o.monitoringService, unittest.equals('foo')); | 249 unittest.expect(o.monitoringService, unittest.equals('foo')); |
228 unittest.expect(o.name, unittest.equals('foo')); | 250 unittest.expect(o.name, unittest.equals('foo')); |
229 unittest.expect(o.network, unittest.equals('foo')); | 251 unittest.expect(o.network, unittest.equals('foo')); |
| 252 checkNetworkPolicy(o.networkPolicy); |
230 checkNodeConfig(o.nodeConfig); | 253 checkNodeConfig(o.nodeConfig); |
231 unittest.expect(o.nodeIpv4CidrSize, unittest.equals(42)); | 254 unittest.expect(o.nodeIpv4CidrSize, unittest.equals(42)); |
232 checkUnnamed1722(o.nodePools); | 255 checkUnnamed1816(o.nodePools); |
233 checkUnnamed1723(o.resourceLabels); | 256 checkUnnamed1817(o.resourceLabels); |
234 unittest.expect(o.selfLink, unittest.equals('foo')); | 257 unittest.expect(o.selfLink, unittest.equals('foo')); |
235 unittest.expect(o.servicesIpv4Cidr, unittest.equals('foo')); | 258 unittest.expect(o.servicesIpv4Cidr, unittest.equals('foo')); |
236 unittest.expect(o.status, unittest.equals('foo')); | 259 unittest.expect(o.status, unittest.equals('foo')); |
237 unittest.expect(o.statusMessage, unittest.equals('foo')); | 260 unittest.expect(o.statusMessage, unittest.equals('foo')); |
238 unittest.expect(o.subnetwork, unittest.equals('foo')); | 261 unittest.expect(o.subnetwork, unittest.equals('foo')); |
239 unittest.expect(o.zone, unittest.equals('foo')); | 262 unittest.expect(o.zone, unittest.equals('foo')); |
240 } | 263 } |
241 buildCounterCluster--; | 264 buildCounterCluster--; |
242 } | 265 } |
243 | 266 |
244 buildUnnamed1724() { | 267 buildUnnamed1818() { |
245 var o = new core.List<core.String>(); | 268 var o = new core.List<core.String>(); |
246 o.add("foo"); | 269 o.add("foo"); |
247 o.add("foo"); | 270 o.add("foo"); |
248 return o; | 271 return o; |
249 } | 272 } |
250 | 273 |
251 checkUnnamed1724(core.List<core.String> o) { | 274 checkUnnamed1818(core.List<core.String> o) { |
252 unittest.expect(o, unittest.hasLength(2)); | 275 unittest.expect(o, unittest.hasLength(2)); |
253 unittest.expect(o[0], unittest.equals('foo')); | 276 unittest.expect(o[0], unittest.equals('foo')); |
254 unittest.expect(o[1], unittest.equals('foo')); | 277 unittest.expect(o[1], unittest.equals('foo')); |
255 } | 278 } |
256 | 279 |
257 core.int buildCounterClusterUpdate = 0; | 280 core.int buildCounterClusterUpdate = 0; |
258 buildClusterUpdate() { | 281 buildClusterUpdate() { |
259 var o = new api.ClusterUpdate(); | 282 var o = new api.ClusterUpdate(); |
260 buildCounterClusterUpdate++; | 283 buildCounterClusterUpdate++; |
261 if (buildCounterClusterUpdate < 3) { | 284 if (buildCounterClusterUpdate < 3) { |
262 o.desiredAddonsConfig = buildAddonsConfig(); | 285 o.desiredAddonsConfig = buildAddonsConfig(); |
263 o.desiredImageType = "foo"; | 286 o.desiredImageType = "foo"; |
264 o.desiredLocations = buildUnnamed1724(); | 287 o.desiredLocations = buildUnnamed1818(); |
265 o.desiredMasterVersion = "foo"; | 288 o.desiredMasterVersion = "foo"; |
266 o.desiredMonitoringService = "foo"; | 289 o.desiredMonitoringService = "foo"; |
267 o.desiredNodePoolAutoscaling = buildNodePoolAutoscaling(); | 290 o.desiredNodePoolAutoscaling = buildNodePoolAutoscaling(); |
268 o.desiredNodePoolId = "foo"; | 291 o.desiredNodePoolId = "foo"; |
269 o.desiredNodeVersion = "foo"; | 292 o.desiredNodeVersion = "foo"; |
270 } | 293 } |
271 buildCounterClusterUpdate--; | 294 buildCounterClusterUpdate--; |
272 return o; | 295 return o; |
273 } | 296 } |
274 | 297 |
275 checkClusterUpdate(api.ClusterUpdate o) { | 298 checkClusterUpdate(api.ClusterUpdate o) { |
276 buildCounterClusterUpdate++; | 299 buildCounterClusterUpdate++; |
277 if (buildCounterClusterUpdate < 3) { | 300 if (buildCounterClusterUpdate < 3) { |
278 checkAddonsConfig(o.desiredAddonsConfig); | 301 checkAddonsConfig(o.desiredAddonsConfig); |
279 unittest.expect(o.desiredImageType, unittest.equals('foo')); | 302 unittest.expect(o.desiredImageType, unittest.equals('foo')); |
280 checkUnnamed1724(o.desiredLocations); | 303 checkUnnamed1818(o.desiredLocations); |
281 unittest.expect(o.desiredMasterVersion, unittest.equals('foo')); | 304 unittest.expect(o.desiredMasterVersion, unittest.equals('foo')); |
282 unittest.expect(o.desiredMonitoringService, unittest.equals('foo')); | 305 unittest.expect(o.desiredMonitoringService, unittest.equals('foo')); |
283 checkNodePoolAutoscaling(o.desiredNodePoolAutoscaling); | 306 checkNodePoolAutoscaling(o.desiredNodePoolAutoscaling); |
284 unittest.expect(o.desiredNodePoolId, unittest.equals('foo')); | 307 unittest.expect(o.desiredNodePoolId, unittest.equals('foo')); |
285 unittest.expect(o.desiredNodeVersion, unittest.equals('foo')); | 308 unittest.expect(o.desiredNodeVersion, unittest.equals('foo')); |
286 } | 309 } |
287 buildCounterClusterUpdate--; | 310 buildCounterClusterUpdate--; |
288 } | 311 } |
289 | 312 |
290 core.int buildCounterCompleteIPRotationRequest = 0; | 313 core.int buildCounterCompleteIPRotationRequest = 0; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 } | 413 } |
391 | 414 |
392 checkHttpLoadBalancing(api.HttpLoadBalancing o) { | 415 checkHttpLoadBalancing(api.HttpLoadBalancing o) { |
393 buildCounterHttpLoadBalancing++; | 416 buildCounterHttpLoadBalancing++; |
394 if (buildCounterHttpLoadBalancing < 3) { | 417 if (buildCounterHttpLoadBalancing < 3) { |
395 unittest.expect(o.disabled, unittest.isTrue); | 418 unittest.expect(o.disabled, unittest.isTrue); |
396 } | 419 } |
397 buildCounterHttpLoadBalancing--; | 420 buildCounterHttpLoadBalancing--; |
398 } | 421 } |
399 | 422 |
| 423 core.int buildCounterIPAllocationPolicy = 0; |
| 424 buildIPAllocationPolicy() { |
| 425 var o = new api.IPAllocationPolicy(); |
| 426 buildCounterIPAllocationPolicy++; |
| 427 if (buildCounterIPAllocationPolicy < 3) { |
| 428 o.clusterIpv4Cidr = "foo"; |
| 429 o.createSubnetwork = true; |
| 430 o.nodeIpv4Cidr = "foo"; |
| 431 o.servicesIpv4Cidr = "foo"; |
| 432 o.subnetworkName = "foo"; |
| 433 o.useIpAliases = true; |
| 434 } |
| 435 buildCounterIPAllocationPolicy--; |
| 436 return o; |
| 437 } |
| 438 |
| 439 checkIPAllocationPolicy(api.IPAllocationPolicy o) { |
| 440 buildCounterIPAllocationPolicy++; |
| 441 if (buildCounterIPAllocationPolicy < 3) { |
| 442 unittest.expect(o.clusterIpv4Cidr, unittest.equals('foo')); |
| 443 unittest.expect(o.createSubnetwork, unittest.isTrue); |
| 444 unittest.expect(o.nodeIpv4Cidr, unittest.equals('foo')); |
| 445 unittest.expect(o.servicesIpv4Cidr, unittest.equals('foo')); |
| 446 unittest.expect(o.subnetworkName, unittest.equals('foo')); |
| 447 unittest.expect(o.useIpAliases, unittest.isTrue); |
| 448 } |
| 449 buildCounterIPAllocationPolicy--; |
| 450 } |
| 451 |
400 core.int buildCounterLegacyAbac = 0; | 452 core.int buildCounterLegacyAbac = 0; |
401 buildLegacyAbac() { | 453 buildLegacyAbac() { |
402 var o = new api.LegacyAbac(); | 454 var o = new api.LegacyAbac(); |
403 buildCounterLegacyAbac++; | 455 buildCounterLegacyAbac++; |
404 if (buildCounterLegacyAbac < 3) { | 456 if (buildCounterLegacyAbac < 3) { |
405 o.enabled = true; | 457 o.enabled = true; |
406 } | 458 } |
407 buildCounterLegacyAbac--; | 459 buildCounterLegacyAbac--; |
408 return o; | 460 return o; |
409 } | 461 } |
410 | 462 |
411 checkLegacyAbac(api.LegacyAbac o) { | 463 checkLegacyAbac(api.LegacyAbac o) { |
412 buildCounterLegacyAbac++; | 464 buildCounterLegacyAbac++; |
413 if (buildCounterLegacyAbac < 3) { | 465 if (buildCounterLegacyAbac < 3) { |
414 unittest.expect(o.enabled, unittest.isTrue); | 466 unittest.expect(o.enabled, unittest.isTrue); |
415 } | 467 } |
416 buildCounterLegacyAbac--; | 468 buildCounterLegacyAbac--; |
417 } | 469 } |
418 | 470 |
419 buildUnnamed1725() { | 471 buildUnnamed1819() { |
420 var o = new core.List<api.Cluster>(); | 472 var o = new core.List<api.Cluster>(); |
421 o.add(buildCluster()); | 473 o.add(buildCluster()); |
422 o.add(buildCluster()); | 474 o.add(buildCluster()); |
423 return o; | 475 return o; |
424 } | 476 } |
425 | 477 |
426 checkUnnamed1725(core.List<api.Cluster> o) { | 478 checkUnnamed1819(core.List<api.Cluster> o) { |
427 unittest.expect(o, unittest.hasLength(2)); | 479 unittest.expect(o, unittest.hasLength(2)); |
428 checkCluster(o[0]); | 480 checkCluster(o[0]); |
429 checkCluster(o[1]); | 481 checkCluster(o[1]); |
430 } | 482 } |
431 | 483 |
432 buildUnnamed1726() { | 484 buildUnnamed1820() { |
433 var o = new core.List<core.String>(); | 485 var o = new core.List<core.String>(); |
434 o.add("foo"); | 486 o.add("foo"); |
435 o.add("foo"); | 487 o.add("foo"); |
436 return o; | 488 return o; |
437 } | 489 } |
438 | 490 |
439 checkUnnamed1726(core.List<core.String> o) { | 491 checkUnnamed1820(core.List<core.String> o) { |
440 unittest.expect(o, unittest.hasLength(2)); | 492 unittest.expect(o, unittest.hasLength(2)); |
441 unittest.expect(o[0], unittest.equals('foo')); | 493 unittest.expect(o[0], unittest.equals('foo')); |
442 unittest.expect(o[1], unittest.equals('foo')); | 494 unittest.expect(o[1], unittest.equals('foo')); |
443 } | 495 } |
444 | 496 |
445 core.int buildCounterListClustersResponse = 0; | 497 core.int buildCounterListClustersResponse = 0; |
446 buildListClustersResponse() { | 498 buildListClustersResponse() { |
447 var o = new api.ListClustersResponse(); | 499 var o = new api.ListClustersResponse(); |
448 buildCounterListClustersResponse++; | 500 buildCounterListClustersResponse++; |
449 if (buildCounterListClustersResponse < 3) { | 501 if (buildCounterListClustersResponse < 3) { |
450 o.clusters = buildUnnamed1725(); | 502 o.clusters = buildUnnamed1819(); |
451 o.missingZones = buildUnnamed1726(); | 503 o.missingZones = buildUnnamed1820(); |
452 } | 504 } |
453 buildCounterListClustersResponse--; | 505 buildCounterListClustersResponse--; |
454 return o; | 506 return o; |
455 } | 507 } |
456 | 508 |
457 checkListClustersResponse(api.ListClustersResponse o) { | 509 checkListClustersResponse(api.ListClustersResponse o) { |
458 buildCounterListClustersResponse++; | 510 buildCounterListClustersResponse++; |
459 if (buildCounterListClustersResponse < 3) { | 511 if (buildCounterListClustersResponse < 3) { |
460 checkUnnamed1725(o.clusters); | 512 checkUnnamed1819(o.clusters); |
461 checkUnnamed1726(o.missingZones); | 513 checkUnnamed1820(o.missingZones); |
462 } | 514 } |
463 buildCounterListClustersResponse--; | 515 buildCounterListClustersResponse--; |
464 } | 516 } |
465 | 517 |
466 buildUnnamed1727() { | 518 buildUnnamed1821() { |
467 var o = new core.List<api.NodePool>(); | 519 var o = new core.List<api.NodePool>(); |
468 o.add(buildNodePool()); | 520 o.add(buildNodePool()); |
469 o.add(buildNodePool()); | 521 o.add(buildNodePool()); |
470 return o; | 522 return o; |
471 } | 523 } |
472 | 524 |
473 checkUnnamed1727(core.List<api.NodePool> o) { | 525 checkUnnamed1821(core.List<api.NodePool> o) { |
474 unittest.expect(o, unittest.hasLength(2)); | 526 unittest.expect(o, unittest.hasLength(2)); |
475 checkNodePool(o[0]); | 527 checkNodePool(o[0]); |
476 checkNodePool(o[1]); | 528 checkNodePool(o[1]); |
477 } | 529 } |
478 | 530 |
479 core.int buildCounterListNodePoolsResponse = 0; | 531 core.int buildCounterListNodePoolsResponse = 0; |
480 buildListNodePoolsResponse() { | 532 buildListNodePoolsResponse() { |
481 var o = new api.ListNodePoolsResponse(); | 533 var o = new api.ListNodePoolsResponse(); |
482 buildCounterListNodePoolsResponse++; | 534 buildCounterListNodePoolsResponse++; |
483 if (buildCounterListNodePoolsResponse < 3) { | 535 if (buildCounterListNodePoolsResponse < 3) { |
484 o.nodePools = buildUnnamed1727(); | 536 o.nodePools = buildUnnamed1821(); |
485 } | 537 } |
486 buildCounterListNodePoolsResponse--; | 538 buildCounterListNodePoolsResponse--; |
487 return o; | 539 return o; |
488 } | 540 } |
489 | 541 |
490 checkListNodePoolsResponse(api.ListNodePoolsResponse o) { | 542 checkListNodePoolsResponse(api.ListNodePoolsResponse o) { |
491 buildCounterListNodePoolsResponse++; | 543 buildCounterListNodePoolsResponse++; |
492 if (buildCounterListNodePoolsResponse < 3) { | 544 if (buildCounterListNodePoolsResponse < 3) { |
493 checkUnnamed1727(o.nodePools); | 545 checkUnnamed1821(o.nodePools); |
494 } | 546 } |
495 buildCounterListNodePoolsResponse--; | 547 buildCounterListNodePoolsResponse--; |
496 } | 548 } |
497 | 549 |
498 buildUnnamed1728() { | 550 buildUnnamed1822() { |
499 var o = new core.List<core.String>(); | 551 var o = new core.List<core.String>(); |
500 o.add("foo"); | 552 o.add("foo"); |
501 o.add("foo"); | 553 o.add("foo"); |
502 return o; | 554 return o; |
503 } | 555 } |
504 | 556 |
505 checkUnnamed1728(core.List<core.String> o) { | 557 checkUnnamed1822(core.List<core.String> o) { |
506 unittest.expect(o, unittest.hasLength(2)); | 558 unittest.expect(o, unittest.hasLength(2)); |
507 unittest.expect(o[0], unittest.equals('foo')); | 559 unittest.expect(o[0], unittest.equals('foo')); |
508 unittest.expect(o[1], unittest.equals('foo')); | 560 unittest.expect(o[1], unittest.equals('foo')); |
509 } | 561 } |
510 | 562 |
511 buildUnnamed1729() { | 563 buildUnnamed1823() { |
512 var o = new core.List<api.Operation>(); | 564 var o = new core.List<api.Operation>(); |
513 o.add(buildOperation()); | 565 o.add(buildOperation()); |
514 o.add(buildOperation()); | 566 o.add(buildOperation()); |
515 return o; | 567 return o; |
516 } | 568 } |
517 | 569 |
518 checkUnnamed1729(core.List<api.Operation> o) { | 570 checkUnnamed1823(core.List<api.Operation> o) { |
519 unittest.expect(o, unittest.hasLength(2)); | 571 unittest.expect(o, unittest.hasLength(2)); |
520 checkOperation(o[0]); | 572 checkOperation(o[0]); |
521 checkOperation(o[1]); | 573 checkOperation(o[1]); |
522 } | 574 } |
523 | 575 |
524 core.int buildCounterListOperationsResponse = 0; | 576 core.int buildCounterListOperationsResponse = 0; |
525 buildListOperationsResponse() { | 577 buildListOperationsResponse() { |
526 var o = new api.ListOperationsResponse(); | 578 var o = new api.ListOperationsResponse(); |
527 buildCounterListOperationsResponse++; | 579 buildCounterListOperationsResponse++; |
528 if (buildCounterListOperationsResponse < 3) { | 580 if (buildCounterListOperationsResponse < 3) { |
529 o.missingZones = buildUnnamed1728(); | 581 o.missingZones = buildUnnamed1822(); |
530 o.operations = buildUnnamed1729(); | 582 o.operations = buildUnnamed1823(); |
531 } | 583 } |
532 buildCounterListOperationsResponse--; | 584 buildCounterListOperationsResponse--; |
533 return o; | 585 return o; |
534 } | 586 } |
535 | 587 |
536 checkListOperationsResponse(api.ListOperationsResponse o) { | 588 checkListOperationsResponse(api.ListOperationsResponse o) { |
537 buildCounterListOperationsResponse++; | 589 buildCounterListOperationsResponse++; |
538 if (buildCounterListOperationsResponse < 3) { | 590 if (buildCounterListOperationsResponse < 3) { |
539 checkUnnamed1728(o.missingZones); | 591 checkUnnamed1822(o.missingZones); |
540 checkUnnamed1729(o.operations); | 592 checkUnnamed1823(o.operations); |
541 } | 593 } |
542 buildCounterListOperationsResponse--; | 594 buildCounterListOperationsResponse--; |
543 } | 595 } |
544 | 596 |
545 core.int buildCounterMasterAuth = 0; | 597 core.int buildCounterMasterAuth = 0; |
546 buildMasterAuth() { | 598 buildMasterAuth() { |
547 var o = new api.MasterAuth(); | 599 var o = new api.MasterAuth(); |
548 buildCounterMasterAuth++; | 600 buildCounterMasterAuth++; |
549 if (buildCounterMasterAuth < 3) { | 601 if (buildCounterMasterAuth < 3) { |
550 o.clientCertificate = "foo"; | 602 o.clientCertificate = "foo"; |
| 603 o.clientCertificateConfig = buildClientCertificateConfig(); |
551 o.clientKey = "foo"; | 604 o.clientKey = "foo"; |
552 o.clusterCaCertificate = "foo"; | 605 o.clusterCaCertificate = "foo"; |
553 o.password = "foo"; | 606 o.password = "foo"; |
554 o.username = "foo"; | 607 o.username = "foo"; |
555 } | 608 } |
556 buildCounterMasterAuth--; | 609 buildCounterMasterAuth--; |
557 return o; | 610 return o; |
558 } | 611 } |
559 | 612 |
560 checkMasterAuth(api.MasterAuth o) { | 613 checkMasterAuth(api.MasterAuth o) { |
561 buildCounterMasterAuth++; | 614 buildCounterMasterAuth++; |
562 if (buildCounterMasterAuth < 3) { | 615 if (buildCounterMasterAuth < 3) { |
563 unittest.expect(o.clientCertificate, unittest.equals('foo')); | 616 unittest.expect(o.clientCertificate, unittest.equals('foo')); |
| 617 checkClientCertificateConfig(o.clientCertificateConfig); |
564 unittest.expect(o.clientKey, unittest.equals('foo')); | 618 unittest.expect(o.clientKey, unittest.equals('foo')); |
565 unittest.expect(o.clusterCaCertificate, unittest.equals('foo')); | 619 unittest.expect(o.clusterCaCertificate, unittest.equals('foo')); |
566 unittest.expect(o.password, unittest.equals('foo')); | 620 unittest.expect(o.password, unittest.equals('foo')); |
567 unittest.expect(o.username, unittest.equals('foo')); | 621 unittest.expect(o.username, unittest.equals('foo')); |
568 } | 622 } |
569 buildCounterMasterAuth--; | 623 buildCounterMasterAuth--; |
570 } | 624 } |
571 | 625 |
572 buildUnnamed1730() { | 626 core.int buildCounterNetworkPolicy = 0; |
| 627 buildNetworkPolicy() { |
| 628 var o = new api.NetworkPolicy(); |
| 629 buildCounterNetworkPolicy++; |
| 630 if (buildCounterNetworkPolicy < 3) { |
| 631 o.enabled = true; |
| 632 o.provider = "foo"; |
| 633 } |
| 634 buildCounterNetworkPolicy--; |
| 635 return o; |
| 636 } |
| 637 |
| 638 checkNetworkPolicy(api.NetworkPolicy o) { |
| 639 buildCounterNetworkPolicy++; |
| 640 if (buildCounterNetworkPolicy < 3) { |
| 641 unittest.expect(o.enabled, unittest.isTrue); |
| 642 unittest.expect(o.provider, unittest.equals('foo')); |
| 643 } |
| 644 buildCounterNetworkPolicy--; |
| 645 } |
| 646 |
| 647 buildUnnamed1824() { |
573 var o = new core.Map<core.String, core.String>(); | 648 var o = new core.Map<core.String, core.String>(); |
574 o["x"] = "foo"; | 649 o["x"] = "foo"; |
575 o["y"] = "foo"; | 650 o["y"] = "foo"; |
576 return o; | 651 return o; |
577 } | 652 } |
578 | 653 |
579 checkUnnamed1730(core.Map<core.String, core.String> o) { | 654 checkUnnamed1824(core.Map<core.String, core.String> o) { |
580 unittest.expect(o, unittest.hasLength(2)); | 655 unittest.expect(o, unittest.hasLength(2)); |
581 unittest.expect(o["x"], unittest.equals('foo')); | 656 unittest.expect(o["x"], unittest.equals('foo')); |
582 unittest.expect(o["y"], unittest.equals('foo')); | 657 unittest.expect(o["y"], unittest.equals('foo')); |
583 } | 658 } |
584 | 659 |
585 buildUnnamed1731() { | 660 buildUnnamed1825() { |
586 var o = new core.Map<core.String, core.String>(); | 661 var o = new core.Map<core.String, core.String>(); |
587 o["x"] = "foo"; | 662 o["x"] = "foo"; |
588 o["y"] = "foo"; | 663 o["y"] = "foo"; |
589 return o; | 664 return o; |
590 } | 665 } |
591 | 666 |
592 checkUnnamed1731(core.Map<core.String, core.String> o) { | 667 checkUnnamed1825(core.Map<core.String, core.String> o) { |
593 unittest.expect(o, unittest.hasLength(2)); | 668 unittest.expect(o, unittest.hasLength(2)); |
594 unittest.expect(o["x"], unittest.equals('foo')); | 669 unittest.expect(o["x"], unittest.equals('foo')); |
595 unittest.expect(o["y"], unittest.equals('foo')); | 670 unittest.expect(o["y"], unittest.equals('foo')); |
596 } | 671 } |
597 | 672 |
598 buildUnnamed1732() { | 673 buildUnnamed1826() { |
599 var o = new core.List<core.String>(); | 674 var o = new core.List<core.String>(); |
600 o.add("foo"); | 675 o.add("foo"); |
601 o.add("foo"); | 676 o.add("foo"); |
602 return o; | 677 return o; |
603 } | 678 } |
604 | 679 |
605 checkUnnamed1732(core.List<core.String> o) { | 680 checkUnnamed1826(core.List<core.String> o) { |
606 unittest.expect(o, unittest.hasLength(2)); | 681 unittest.expect(o, unittest.hasLength(2)); |
607 unittest.expect(o[0], unittest.equals('foo')); | 682 unittest.expect(o[0], unittest.equals('foo')); |
608 unittest.expect(o[1], unittest.equals('foo')); | 683 unittest.expect(o[1], unittest.equals('foo')); |
609 } | 684 } |
610 | 685 |
611 buildUnnamed1733() { | 686 buildUnnamed1827() { |
612 var o = new core.List<core.String>(); | 687 var o = new core.List<core.String>(); |
613 o.add("foo"); | 688 o.add("foo"); |
614 o.add("foo"); | 689 o.add("foo"); |
615 return o; | 690 return o; |
616 } | 691 } |
617 | 692 |
618 checkUnnamed1733(core.List<core.String> o) { | 693 checkUnnamed1827(core.List<core.String> o) { |
619 unittest.expect(o, unittest.hasLength(2)); | 694 unittest.expect(o, unittest.hasLength(2)); |
620 unittest.expect(o[0], unittest.equals('foo')); | 695 unittest.expect(o[0], unittest.equals('foo')); |
621 unittest.expect(o[1], unittest.equals('foo')); | 696 unittest.expect(o[1], unittest.equals('foo')); |
622 } | 697 } |
623 | 698 |
624 core.int buildCounterNodeConfig = 0; | 699 core.int buildCounterNodeConfig = 0; |
625 buildNodeConfig() { | 700 buildNodeConfig() { |
626 var o = new api.NodeConfig(); | 701 var o = new api.NodeConfig(); |
627 buildCounterNodeConfig++; | 702 buildCounterNodeConfig++; |
628 if (buildCounterNodeConfig < 3) { | 703 if (buildCounterNodeConfig < 3) { |
629 o.diskSizeGb = 42; | 704 o.diskSizeGb = 42; |
630 o.imageType = "foo"; | 705 o.imageType = "foo"; |
631 o.labels = buildUnnamed1730(); | 706 o.labels = buildUnnamed1824(); |
632 o.localSsdCount = 42; | 707 o.localSsdCount = 42; |
633 o.machineType = "foo"; | 708 o.machineType = "foo"; |
634 o.metadata = buildUnnamed1731(); | 709 o.metadata = buildUnnamed1825(); |
635 o.oauthScopes = buildUnnamed1732(); | 710 o.oauthScopes = buildUnnamed1826(); |
636 o.preemptible = true; | 711 o.preemptible = true; |
637 o.serviceAccount = "foo"; | 712 o.serviceAccount = "foo"; |
638 o.tags = buildUnnamed1733(); | 713 o.tags = buildUnnamed1827(); |
639 } | 714 } |
640 buildCounterNodeConfig--; | 715 buildCounterNodeConfig--; |
641 return o; | 716 return o; |
642 } | 717 } |
643 | 718 |
644 checkNodeConfig(api.NodeConfig o) { | 719 checkNodeConfig(api.NodeConfig o) { |
645 buildCounterNodeConfig++; | 720 buildCounterNodeConfig++; |
646 if (buildCounterNodeConfig < 3) { | 721 if (buildCounterNodeConfig < 3) { |
647 unittest.expect(o.diskSizeGb, unittest.equals(42)); | 722 unittest.expect(o.diskSizeGb, unittest.equals(42)); |
648 unittest.expect(o.imageType, unittest.equals('foo')); | 723 unittest.expect(o.imageType, unittest.equals('foo')); |
649 checkUnnamed1730(o.labels); | 724 checkUnnamed1824(o.labels); |
650 unittest.expect(o.localSsdCount, unittest.equals(42)); | 725 unittest.expect(o.localSsdCount, unittest.equals(42)); |
651 unittest.expect(o.machineType, unittest.equals('foo')); | 726 unittest.expect(o.machineType, unittest.equals('foo')); |
652 checkUnnamed1731(o.metadata); | 727 checkUnnamed1825(o.metadata); |
653 checkUnnamed1732(o.oauthScopes); | 728 checkUnnamed1826(o.oauthScopes); |
654 unittest.expect(o.preemptible, unittest.isTrue); | 729 unittest.expect(o.preemptible, unittest.isTrue); |
655 unittest.expect(o.serviceAccount, unittest.equals('foo')); | 730 unittest.expect(o.serviceAccount, unittest.equals('foo')); |
656 checkUnnamed1733(o.tags); | 731 checkUnnamed1827(o.tags); |
657 } | 732 } |
658 buildCounterNodeConfig--; | 733 buildCounterNodeConfig--; |
659 } | 734 } |
660 | 735 |
661 core.int buildCounterNodeManagement = 0; | 736 core.int buildCounterNodeManagement = 0; |
662 buildNodeManagement() { | 737 buildNodeManagement() { |
663 var o = new api.NodeManagement(); | 738 var o = new api.NodeManagement(); |
664 buildCounterNodeManagement++; | 739 buildCounterNodeManagement++; |
665 if (buildCounterNodeManagement < 3) { | 740 if (buildCounterNodeManagement < 3) { |
666 o.autoRepair = true; | 741 o.autoRepair = true; |
667 o.autoUpgrade = true; | 742 o.autoUpgrade = true; |
668 o.upgradeOptions = buildAutoUpgradeOptions(); | 743 o.upgradeOptions = buildAutoUpgradeOptions(); |
669 } | 744 } |
670 buildCounterNodeManagement--; | 745 buildCounterNodeManagement--; |
671 return o; | 746 return o; |
672 } | 747 } |
673 | 748 |
674 checkNodeManagement(api.NodeManagement o) { | 749 checkNodeManagement(api.NodeManagement o) { |
675 buildCounterNodeManagement++; | 750 buildCounterNodeManagement++; |
676 if (buildCounterNodeManagement < 3) { | 751 if (buildCounterNodeManagement < 3) { |
677 unittest.expect(o.autoRepair, unittest.isTrue); | 752 unittest.expect(o.autoRepair, unittest.isTrue); |
678 unittest.expect(o.autoUpgrade, unittest.isTrue); | 753 unittest.expect(o.autoUpgrade, unittest.isTrue); |
679 checkAutoUpgradeOptions(o.upgradeOptions); | 754 checkAutoUpgradeOptions(o.upgradeOptions); |
680 } | 755 } |
681 buildCounterNodeManagement--; | 756 buildCounterNodeManagement--; |
682 } | 757 } |
683 | 758 |
684 buildUnnamed1734() { | 759 buildUnnamed1828() { |
685 var o = new core.List<core.String>(); | 760 var o = new core.List<core.String>(); |
686 o.add("foo"); | 761 o.add("foo"); |
687 o.add("foo"); | 762 o.add("foo"); |
688 return o; | 763 return o; |
689 } | 764 } |
690 | 765 |
691 checkUnnamed1734(core.List<core.String> o) { | 766 checkUnnamed1828(core.List<core.String> o) { |
692 unittest.expect(o, unittest.hasLength(2)); | 767 unittest.expect(o, unittest.hasLength(2)); |
693 unittest.expect(o[0], unittest.equals('foo')); | 768 unittest.expect(o[0], unittest.equals('foo')); |
694 unittest.expect(o[1], unittest.equals('foo')); | 769 unittest.expect(o[1], unittest.equals('foo')); |
695 } | 770 } |
696 | 771 |
697 core.int buildCounterNodePool = 0; | 772 core.int buildCounterNodePool = 0; |
698 buildNodePool() { | 773 buildNodePool() { |
699 var o = new api.NodePool(); | 774 var o = new api.NodePool(); |
700 buildCounterNodePool++; | 775 buildCounterNodePool++; |
701 if (buildCounterNodePool < 3) { | 776 if (buildCounterNodePool < 3) { |
702 o.autoscaling = buildNodePoolAutoscaling(); | 777 o.autoscaling = buildNodePoolAutoscaling(); |
703 o.config = buildNodeConfig(); | 778 o.config = buildNodeConfig(); |
704 o.initialNodeCount = 42; | 779 o.initialNodeCount = 42; |
705 o.instanceGroupUrls = buildUnnamed1734(); | 780 o.instanceGroupUrls = buildUnnamed1828(); |
706 o.management = buildNodeManagement(); | 781 o.management = buildNodeManagement(); |
707 o.name = "foo"; | 782 o.name = "foo"; |
708 o.selfLink = "foo"; | 783 o.selfLink = "foo"; |
709 o.status = "foo"; | 784 o.status = "foo"; |
710 o.statusMessage = "foo"; | 785 o.statusMessage = "foo"; |
711 o.version = "foo"; | 786 o.version = "foo"; |
712 } | 787 } |
713 buildCounterNodePool--; | 788 buildCounterNodePool--; |
714 return o; | 789 return o; |
715 } | 790 } |
716 | 791 |
717 checkNodePool(api.NodePool o) { | 792 checkNodePool(api.NodePool o) { |
718 buildCounterNodePool++; | 793 buildCounterNodePool++; |
719 if (buildCounterNodePool < 3) { | 794 if (buildCounterNodePool < 3) { |
720 checkNodePoolAutoscaling(o.autoscaling); | 795 checkNodePoolAutoscaling(o.autoscaling); |
721 checkNodeConfig(o.config); | 796 checkNodeConfig(o.config); |
722 unittest.expect(o.initialNodeCount, unittest.equals(42)); | 797 unittest.expect(o.initialNodeCount, unittest.equals(42)); |
723 checkUnnamed1734(o.instanceGroupUrls); | 798 checkUnnamed1828(o.instanceGroupUrls); |
724 checkNodeManagement(o.management); | 799 checkNodeManagement(o.management); |
725 unittest.expect(o.name, unittest.equals('foo')); | 800 unittest.expect(o.name, unittest.equals('foo')); |
726 unittest.expect(o.selfLink, unittest.equals('foo')); | 801 unittest.expect(o.selfLink, unittest.equals('foo')); |
727 unittest.expect(o.status, unittest.equals('foo')); | 802 unittest.expect(o.status, unittest.equals('foo')); |
728 unittest.expect(o.statusMessage, unittest.equals('foo')); | 803 unittest.expect(o.statusMessage, unittest.equals('foo')); |
729 unittest.expect(o.version, unittest.equals('foo')); | 804 unittest.expect(o.version, unittest.equals('foo')); |
730 } | 805 } |
731 buildCounterNodePool--; | 806 buildCounterNodePool--; |
732 } | 807 } |
733 | 808 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 return o; | 872 return o; |
798 } | 873 } |
799 | 874 |
800 checkRollbackNodePoolUpgradeRequest(api.RollbackNodePoolUpgradeRequest o) { | 875 checkRollbackNodePoolUpgradeRequest(api.RollbackNodePoolUpgradeRequest o) { |
801 buildCounterRollbackNodePoolUpgradeRequest++; | 876 buildCounterRollbackNodePoolUpgradeRequest++; |
802 if (buildCounterRollbackNodePoolUpgradeRequest < 3) { | 877 if (buildCounterRollbackNodePoolUpgradeRequest < 3) { |
803 } | 878 } |
804 buildCounterRollbackNodePoolUpgradeRequest--; | 879 buildCounterRollbackNodePoolUpgradeRequest--; |
805 } | 880 } |
806 | 881 |
807 buildUnnamed1735() { | 882 buildUnnamed1829() { |
808 var o = new core.List<core.String>(); | 883 var o = new core.List<core.String>(); |
809 o.add("foo"); | 884 o.add("foo"); |
810 o.add("foo"); | 885 o.add("foo"); |
811 return o; | 886 return o; |
812 } | 887 } |
813 | 888 |
814 checkUnnamed1735(core.List<core.String> o) { | 889 checkUnnamed1829(core.List<core.String> o) { |
815 unittest.expect(o, unittest.hasLength(2)); | 890 unittest.expect(o, unittest.hasLength(2)); |
816 unittest.expect(o[0], unittest.equals('foo')); | 891 unittest.expect(o[0], unittest.equals('foo')); |
817 unittest.expect(o[1], unittest.equals('foo')); | 892 unittest.expect(o[1], unittest.equals('foo')); |
818 } | 893 } |
819 | 894 |
820 buildUnnamed1736() { | 895 buildUnnamed1830() { |
821 var o = new core.List<core.String>(); | 896 var o = new core.List<core.String>(); |
822 o.add("foo"); | 897 o.add("foo"); |
823 o.add("foo"); | 898 o.add("foo"); |
824 return o; | 899 return o; |
825 } | 900 } |
826 | 901 |
827 checkUnnamed1736(core.List<core.String> o) { | 902 checkUnnamed1830(core.List<core.String> o) { |
828 unittest.expect(o, unittest.hasLength(2)); | 903 unittest.expect(o, unittest.hasLength(2)); |
829 unittest.expect(o[0], unittest.equals('foo')); | 904 unittest.expect(o[0], unittest.equals('foo')); |
830 unittest.expect(o[1], unittest.equals('foo')); | 905 unittest.expect(o[1], unittest.equals('foo')); |
831 } | 906 } |
832 | 907 |
833 buildUnnamed1737() { | 908 buildUnnamed1831() { |
834 var o = new core.List<core.String>(); | 909 var o = new core.List<core.String>(); |
835 o.add("foo"); | 910 o.add("foo"); |
836 o.add("foo"); | 911 o.add("foo"); |
837 return o; | 912 return o; |
838 } | 913 } |
839 | 914 |
840 checkUnnamed1737(core.List<core.String> o) { | 915 checkUnnamed1831(core.List<core.String> o) { |
841 unittest.expect(o, unittest.hasLength(2)); | 916 unittest.expect(o, unittest.hasLength(2)); |
842 unittest.expect(o[0], unittest.equals('foo')); | 917 unittest.expect(o[0], unittest.equals('foo')); |
843 unittest.expect(o[1], unittest.equals('foo')); | 918 unittest.expect(o[1], unittest.equals('foo')); |
844 } | 919 } |
845 | 920 |
846 core.int buildCounterServerConfig = 0; | 921 core.int buildCounterServerConfig = 0; |
847 buildServerConfig() { | 922 buildServerConfig() { |
848 var o = new api.ServerConfig(); | 923 var o = new api.ServerConfig(); |
849 buildCounterServerConfig++; | 924 buildCounterServerConfig++; |
850 if (buildCounterServerConfig < 3) { | 925 if (buildCounterServerConfig < 3) { |
851 o.defaultClusterVersion = "foo"; | 926 o.defaultClusterVersion = "foo"; |
852 o.defaultImageType = "foo"; | 927 o.defaultImageType = "foo"; |
853 o.validImageTypes = buildUnnamed1735(); | 928 o.validImageTypes = buildUnnamed1829(); |
854 o.validMasterVersions = buildUnnamed1736(); | 929 o.validMasterVersions = buildUnnamed1830(); |
855 o.validNodeVersions = buildUnnamed1737(); | 930 o.validNodeVersions = buildUnnamed1831(); |
856 } | 931 } |
857 buildCounterServerConfig--; | 932 buildCounterServerConfig--; |
858 return o; | 933 return o; |
859 } | 934 } |
860 | 935 |
861 checkServerConfig(api.ServerConfig o) { | 936 checkServerConfig(api.ServerConfig o) { |
862 buildCounterServerConfig++; | 937 buildCounterServerConfig++; |
863 if (buildCounterServerConfig < 3) { | 938 if (buildCounterServerConfig < 3) { |
864 unittest.expect(o.defaultClusterVersion, unittest.equals('foo')); | 939 unittest.expect(o.defaultClusterVersion, unittest.equals('foo')); |
865 unittest.expect(o.defaultImageType, unittest.equals('foo')); | 940 unittest.expect(o.defaultImageType, unittest.equals('foo')); |
866 checkUnnamed1735(o.validImageTypes); | 941 checkUnnamed1829(o.validImageTypes); |
867 checkUnnamed1736(o.validMasterVersions); | 942 checkUnnamed1830(o.validMasterVersions); |
868 checkUnnamed1737(o.validNodeVersions); | 943 checkUnnamed1831(o.validNodeVersions); |
869 } | 944 } |
870 buildCounterServerConfig--; | 945 buildCounterServerConfig--; |
871 } | 946 } |
872 | 947 |
873 buildUnnamed1738() { | 948 core.int buildCounterSetAddonsConfigRequest = 0; |
| 949 buildSetAddonsConfigRequest() { |
| 950 var o = new api.SetAddonsConfigRequest(); |
| 951 buildCounterSetAddonsConfigRequest++; |
| 952 if (buildCounterSetAddonsConfigRequest < 3) { |
| 953 o.addonsConfig = buildAddonsConfig(); |
| 954 } |
| 955 buildCounterSetAddonsConfigRequest--; |
| 956 return o; |
| 957 } |
| 958 |
| 959 checkSetAddonsConfigRequest(api.SetAddonsConfigRequest o) { |
| 960 buildCounterSetAddonsConfigRequest++; |
| 961 if (buildCounterSetAddonsConfigRequest < 3) { |
| 962 checkAddonsConfig(o.addonsConfig); |
| 963 } |
| 964 buildCounterSetAddonsConfigRequest--; |
| 965 } |
| 966 |
| 967 buildUnnamed1832() { |
874 var o = new core.Map<core.String, core.String>(); | 968 var o = new core.Map<core.String, core.String>(); |
875 o["x"] = "foo"; | 969 o["x"] = "foo"; |
876 o["y"] = "foo"; | 970 o["y"] = "foo"; |
877 return o; | 971 return o; |
878 } | 972 } |
879 | 973 |
880 checkUnnamed1738(core.Map<core.String, core.String> o) { | 974 checkUnnamed1832(core.Map<core.String, core.String> o) { |
881 unittest.expect(o, unittest.hasLength(2)); | 975 unittest.expect(o, unittest.hasLength(2)); |
882 unittest.expect(o["x"], unittest.equals('foo')); | 976 unittest.expect(o["x"], unittest.equals('foo')); |
883 unittest.expect(o["y"], unittest.equals('foo')); | 977 unittest.expect(o["y"], unittest.equals('foo')); |
884 } | 978 } |
885 | 979 |
886 core.int buildCounterSetLabelsRequest = 0; | 980 core.int buildCounterSetLabelsRequest = 0; |
887 buildSetLabelsRequest() { | 981 buildSetLabelsRequest() { |
888 var o = new api.SetLabelsRequest(); | 982 var o = new api.SetLabelsRequest(); |
889 buildCounterSetLabelsRequest++; | 983 buildCounterSetLabelsRequest++; |
890 if (buildCounterSetLabelsRequest < 3) { | 984 if (buildCounterSetLabelsRequest < 3) { |
891 o.labelFingerprint = "foo"; | 985 o.labelFingerprint = "foo"; |
892 o.resourceLabels = buildUnnamed1738(); | 986 o.resourceLabels = buildUnnamed1832(); |
893 } | 987 } |
894 buildCounterSetLabelsRequest--; | 988 buildCounterSetLabelsRequest--; |
895 return o; | 989 return o; |
896 } | 990 } |
897 | 991 |
898 checkSetLabelsRequest(api.SetLabelsRequest o) { | 992 checkSetLabelsRequest(api.SetLabelsRequest o) { |
899 buildCounterSetLabelsRequest++; | 993 buildCounterSetLabelsRequest++; |
900 if (buildCounterSetLabelsRequest < 3) { | 994 if (buildCounterSetLabelsRequest < 3) { |
901 unittest.expect(o.labelFingerprint, unittest.equals('foo')); | 995 unittest.expect(o.labelFingerprint, unittest.equals('foo')); |
902 checkUnnamed1738(o.resourceLabels); | 996 checkUnnamed1832(o.resourceLabels); |
903 } | 997 } |
904 buildCounterSetLabelsRequest--; | 998 buildCounterSetLabelsRequest--; |
905 } | 999 } |
906 | 1000 |
907 core.int buildCounterSetLegacyAbacRequest = 0; | 1001 core.int buildCounterSetLegacyAbacRequest = 0; |
908 buildSetLegacyAbacRequest() { | 1002 buildSetLegacyAbacRequest() { |
909 var o = new api.SetLegacyAbacRequest(); | 1003 var o = new api.SetLegacyAbacRequest(); |
910 buildCounterSetLegacyAbacRequest++; | 1004 buildCounterSetLegacyAbacRequest++; |
911 if (buildCounterSetLegacyAbacRequest < 3) { | 1005 if (buildCounterSetLegacyAbacRequest < 3) { |
912 o.enabled = true; | 1006 o.enabled = true; |
913 } | 1007 } |
914 buildCounterSetLegacyAbacRequest--; | 1008 buildCounterSetLegacyAbacRequest--; |
915 return o; | 1009 return o; |
916 } | 1010 } |
917 | 1011 |
918 checkSetLegacyAbacRequest(api.SetLegacyAbacRequest o) { | 1012 checkSetLegacyAbacRequest(api.SetLegacyAbacRequest o) { |
919 buildCounterSetLegacyAbacRequest++; | 1013 buildCounterSetLegacyAbacRequest++; |
920 if (buildCounterSetLegacyAbacRequest < 3) { | 1014 if (buildCounterSetLegacyAbacRequest < 3) { |
921 unittest.expect(o.enabled, unittest.isTrue); | 1015 unittest.expect(o.enabled, unittest.isTrue); |
922 } | 1016 } |
923 buildCounterSetLegacyAbacRequest--; | 1017 buildCounterSetLegacyAbacRequest--; |
924 } | 1018 } |
925 | 1019 |
| 1020 buildUnnamed1833() { |
| 1021 var o = new core.List<core.String>(); |
| 1022 o.add("foo"); |
| 1023 o.add("foo"); |
| 1024 return o; |
| 1025 } |
| 1026 |
| 1027 checkUnnamed1833(core.List<core.String> o) { |
| 1028 unittest.expect(o, unittest.hasLength(2)); |
| 1029 unittest.expect(o[0], unittest.equals('foo')); |
| 1030 unittest.expect(o[1], unittest.equals('foo')); |
| 1031 } |
| 1032 |
| 1033 core.int buildCounterSetLocationsRequest = 0; |
| 1034 buildSetLocationsRequest() { |
| 1035 var o = new api.SetLocationsRequest(); |
| 1036 buildCounterSetLocationsRequest++; |
| 1037 if (buildCounterSetLocationsRequest < 3) { |
| 1038 o.locations = buildUnnamed1833(); |
| 1039 } |
| 1040 buildCounterSetLocationsRequest--; |
| 1041 return o; |
| 1042 } |
| 1043 |
| 1044 checkSetLocationsRequest(api.SetLocationsRequest o) { |
| 1045 buildCounterSetLocationsRequest++; |
| 1046 if (buildCounterSetLocationsRequest < 3) { |
| 1047 checkUnnamed1833(o.locations); |
| 1048 } |
| 1049 buildCounterSetLocationsRequest--; |
| 1050 } |
| 1051 |
| 1052 core.int buildCounterSetLoggingServiceRequest = 0; |
| 1053 buildSetLoggingServiceRequest() { |
| 1054 var o = new api.SetLoggingServiceRequest(); |
| 1055 buildCounterSetLoggingServiceRequest++; |
| 1056 if (buildCounterSetLoggingServiceRequest < 3) { |
| 1057 o.loggingService = "foo"; |
| 1058 } |
| 1059 buildCounterSetLoggingServiceRequest--; |
| 1060 return o; |
| 1061 } |
| 1062 |
| 1063 checkSetLoggingServiceRequest(api.SetLoggingServiceRequest o) { |
| 1064 buildCounterSetLoggingServiceRequest++; |
| 1065 if (buildCounterSetLoggingServiceRequest < 3) { |
| 1066 unittest.expect(o.loggingService, unittest.equals('foo')); |
| 1067 } |
| 1068 buildCounterSetLoggingServiceRequest--; |
| 1069 } |
| 1070 |
926 core.int buildCounterSetMasterAuthRequest = 0; | 1071 core.int buildCounterSetMasterAuthRequest = 0; |
927 buildSetMasterAuthRequest() { | 1072 buildSetMasterAuthRequest() { |
928 var o = new api.SetMasterAuthRequest(); | 1073 var o = new api.SetMasterAuthRequest(); |
929 buildCounterSetMasterAuthRequest++; | 1074 buildCounterSetMasterAuthRequest++; |
930 if (buildCounterSetMasterAuthRequest < 3) { | 1075 if (buildCounterSetMasterAuthRequest < 3) { |
931 o.action = "foo"; | 1076 o.action = "foo"; |
932 o.update = buildMasterAuth(); | 1077 o.update = buildMasterAuth(); |
933 } | 1078 } |
934 buildCounterSetMasterAuthRequest--; | 1079 buildCounterSetMasterAuthRequest--; |
935 return o; | 1080 return o; |
936 } | 1081 } |
937 | 1082 |
938 checkSetMasterAuthRequest(api.SetMasterAuthRequest o) { | 1083 checkSetMasterAuthRequest(api.SetMasterAuthRequest o) { |
939 buildCounterSetMasterAuthRequest++; | 1084 buildCounterSetMasterAuthRequest++; |
940 if (buildCounterSetMasterAuthRequest < 3) { | 1085 if (buildCounterSetMasterAuthRequest < 3) { |
941 unittest.expect(o.action, unittest.equals('foo')); | 1086 unittest.expect(o.action, unittest.equals('foo')); |
942 checkMasterAuth(o.update); | 1087 checkMasterAuth(o.update); |
943 } | 1088 } |
944 buildCounterSetMasterAuthRequest--; | 1089 buildCounterSetMasterAuthRequest--; |
945 } | 1090 } |
946 | 1091 |
| 1092 core.int buildCounterSetMonitoringServiceRequest = 0; |
| 1093 buildSetMonitoringServiceRequest() { |
| 1094 var o = new api.SetMonitoringServiceRequest(); |
| 1095 buildCounterSetMonitoringServiceRequest++; |
| 1096 if (buildCounterSetMonitoringServiceRequest < 3) { |
| 1097 o.monitoringService = "foo"; |
| 1098 } |
| 1099 buildCounterSetMonitoringServiceRequest--; |
| 1100 return o; |
| 1101 } |
| 1102 |
| 1103 checkSetMonitoringServiceRequest(api.SetMonitoringServiceRequest o) { |
| 1104 buildCounterSetMonitoringServiceRequest++; |
| 1105 if (buildCounterSetMonitoringServiceRequest < 3) { |
| 1106 unittest.expect(o.monitoringService, unittest.equals('foo')); |
| 1107 } |
| 1108 buildCounterSetMonitoringServiceRequest--; |
| 1109 } |
| 1110 |
| 1111 core.int buildCounterSetNetworkPolicyRequest = 0; |
| 1112 buildSetNetworkPolicyRequest() { |
| 1113 var o = new api.SetNetworkPolicyRequest(); |
| 1114 buildCounterSetNetworkPolicyRequest++; |
| 1115 if (buildCounterSetNetworkPolicyRequest < 3) { |
| 1116 o.networkPolicy = buildNetworkPolicy(); |
| 1117 } |
| 1118 buildCounterSetNetworkPolicyRequest--; |
| 1119 return o; |
| 1120 } |
| 1121 |
| 1122 checkSetNetworkPolicyRequest(api.SetNetworkPolicyRequest o) { |
| 1123 buildCounterSetNetworkPolicyRequest++; |
| 1124 if (buildCounterSetNetworkPolicyRequest < 3) { |
| 1125 checkNetworkPolicy(o.networkPolicy); |
| 1126 } |
| 1127 buildCounterSetNetworkPolicyRequest--; |
| 1128 } |
| 1129 |
| 1130 core.int buildCounterSetNodePoolAutoscalingRequest = 0; |
| 1131 buildSetNodePoolAutoscalingRequest() { |
| 1132 var o = new api.SetNodePoolAutoscalingRequest(); |
| 1133 buildCounterSetNodePoolAutoscalingRequest++; |
| 1134 if (buildCounterSetNodePoolAutoscalingRequest < 3) { |
| 1135 o.autoscaling = buildNodePoolAutoscaling(); |
| 1136 } |
| 1137 buildCounterSetNodePoolAutoscalingRequest--; |
| 1138 return o; |
| 1139 } |
| 1140 |
| 1141 checkSetNodePoolAutoscalingRequest(api.SetNodePoolAutoscalingRequest o) { |
| 1142 buildCounterSetNodePoolAutoscalingRequest++; |
| 1143 if (buildCounterSetNodePoolAutoscalingRequest < 3) { |
| 1144 checkNodePoolAutoscaling(o.autoscaling); |
| 1145 } |
| 1146 buildCounterSetNodePoolAutoscalingRequest--; |
| 1147 } |
| 1148 |
947 core.int buildCounterSetNodePoolManagementRequest = 0; | 1149 core.int buildCounterSetNodePoolManagementRequest = 0; |
948 buildSetNodePoolManagementRequest() { | 1150 buildSetNodePoolManagementRequest() { |
949 var o = new api.SetNodePoolManagementRequest(); | 1151 var o = new api.SetNodePoolManagementRequest(); |
950 buildCounterSetNodePoolManagementRequest++; | 1152 buildCounterSetNodePoolManagementRequest++; |
951 if (buildCounterSetNodePoolManagementRequest < 3) { | 1153 if (buildCounterSetNodePoolManagementRequest < 3) { |
952 o.management = buildNodeManagement(); | 1154 o.management = buildNodeManagement(); |
953 } | 1155 } |
954 buildCounterSetNodePoolManagementRequest--; | 1156 buildCounterSetNodePoolManagementRequest--; |
955 return o; | 1157 return o; |
956 } | 1158 } |
957 | 1159 |
958 checkSetNodePoolManagementRequest(api.SetNodePoolManagementRequest o) { | 1160 checkSetNodePoolManagementRequest(api.SetNodePoolManagementRequest o) { |
959 buildCounterSetNodePoolManagementRequest++; | 1161 buildCounterSetNodePoolManagementRequest++; |
960 if (buildCounterSetNodePoolManagementRequest < 3) { | 1162 if (buildCounterSetNodePoolManagementRequest < 3) { |
961 checkNodeManagement(o.management); | 1163 checkNodeManagement(o.management); |
962 } | 1164 } |
963 buildCounterSetNodePoolManagementRequest--; | 1165 buildCounterSetNodePoolManagementRequest--; |
964 } | 1166 } |
965 | 1167 |
| 1168 core.int buildCounterSetNodePoolSizeRequest = 0; |
| 1169 buildSetNodePoolSizeRequest() { |
| 1170 var o = new api.SetNodePoolSizeRequest(); |
| 1171 buildCounterSetNodePoolSizeRequest++; |
| 1172 if (buildCounterSetNodePoolSizeRequest < 3) { |
| 1173 o.nodeCount = 42; |
| 1174 } |
| 1175 buildCounterSetNodePoolSizeRequest--; |
| 1176 return o; |
| 1177 } |
| 1178 |
| 1179 checkSetNodePoolSizeRequest(api.SetNodePoolSizeRequest o) { |
| 1180 buildCounterSetNodePoolSizeRequest++; |
| 1181 if (buildCounterSetNodePoolSizeRequest < 3) { |
| 1182 unittest.expect(o.nodeCount, unittest.equals(42)); |
| 1183 } |
| 1184 buildCounterSetNodePoolSizeRequest--; |
| 1185 } |
| 1186 |
966 core.int buildCounterStartIPRotationRequest = 0; | 1187 core.int buildCounterStartIPRotationRequest = 0; |
967 buildStartIPRotationRequest() { | 1188 buildStartIPRotationRequest() { |
968 var o = new api.StartIPRotationRequest(); | 1189 var o = new api.StartIPRotationRequest(); |
969 buildCounterStartIPRotationRequest++; | 1190 buildCounterStartIPRotationRequest++; |
970 if (buildCounterStartIPRotationRequest < 3) { | 1191 if (buildCounterStartIPRotationRequest < 3) { |
971 } | 1192 } |
972 buildCounterStartIPRotationRequest--; | 1193 buildCounterStartIPRotationRequest--; |
973 return o; | 1194 return o; |
974 } | 1195 } |
975 | 1196 |
(...skipping 16 matching lines...) Expand all Loading... |
992 } | 1213 } |
993 | 1214 |
994 checkUpdateClusterRequest(api.UpdateClusterRequest o) { | 1215 checkUpdateClusterRequest(api.UpdateClusterRequest o) { |
995 buildCounterUpdateClusterRequest++; | 1216 buildCounterUpdateClusterRequest++; |
996 if (buildCounterUpdateClusterRequest < 3) { | 1217 if (buildCounterUpdateClusterRequest < 3) { |
997 checkClusterUpdate(o.update); | 1218 checkClusterUpdate(o.update); |
998 } | 1219 } |
999 buildCounterUpdateClusterRequest--; | 1220 buildCounterUpdateClusterRequest--; |
1000 } | 1221 } |
1001 | 1222 |
| 1223 core.int buildCounterUpdateMasterRequest = 0; |
| 1224 buildUpdateMasterRequest() { |
| 1225 var o = new api.UpdateMasterRequest(); |
| 1226 buildCounterUpdateMasterRequest++; |
| 1227 if (buildCounterUpdateMasterRequest < 3) { |
| 1228 o.masterVersion = "foo"; |
| 1229 } |
| 1230 buildCounterUpdateMasterRequest--; |
| 1231 return o; |
| 1232 } |
| 1233 |
| 1234 checkUpdateMasterRequest(api.UpdateMasterRequest o) { |
| 1235 buildCounterUpdateMasterRequest++; |
| 1236 if (buildCounterUpdateMasterRequest < 3) { |
| 1237 unittest.expect(o.masterVersion, unittest.equals('foo')); |
| 1238 } |
| 1239 buildCounterUpdateMasterRequest--; |
| 1240 } |
| 1241 |
| 1242 core.int buildCounterUpdateNodePoolRequest = 0; |
| 1243 buildUpdateNodePoolRequest() { |
| 1244 var o = new api.UpdateNodePoolRequest(); |
| 1245 buildCounterUpdateNodePoolRequest++; |
| 1246 if (buildCounterUpdateNodePoolRequest < 3) { |
| 1247 o.imageType = "foo"; |
| 1248 o.nodeVersion = "foo"; |
| 1249 } |
| 1250 buildCounterUpdateNodePoolRequest--; |
| 1251 return o; |
| 1252 } |
| 1253 |
| 1254 checkUpdateNodePoolRequest(api.UpdateNodePoolRequest o) { |
| 1255 buildCounterUpdateNodePoolRequest++; |
| 1256 if (buildCounterUpdateNodePoolRequest < 3) { |
| 1257 unittest.expect(o.imageType, unittest.equals('foo')); |
| 1258 unittest.expect(o.nodeVersion, unittest.equals('foo')); |
| 1259 } |
| 1260 buildCounterUpdateNodePoolRequest--; |
| 1261 } |
| 1262 |
1002 | 1263 |
1003 main() { | 1264 main() { |
1004 unittest.group("obj-schema-AddonsConfig", () { | 1265 unittest.group("obj-schema-AddonsConfig", () { |
1005 unittest.test("to-json--from-json", () { | 1266 unittest.test("to-json--from-json", () { |
1006 var o = buildAddonsConfig(); | 1267 var o = buildAddonsConfig(); |
1007 var od = new api.AddonsConfig.fromJson(o.toJson()); | 1268 var od = new api.AddonsConfig.fromJson(o.toJson()); |
1008 checkAddonsConfig(od); | 1269 checkAddonsConfig(od); |
1009 }); | 1270 }); |
1010 }); | 1271 }); |
1011 | 1272 |
1012 | 1273 |
1013 unittest.group("obj-schema-AutoUpgradeOptions", () { | 1274 unittest.group("obj-schema-AutoUpgradeOptions", () { |
1014 unittest.test("to-json--from-json", () { | 1275 unittest.test("to-json--from-json", () { |
1015 var o = buildAutoUpgradeOptions(); | 1276 var o = buildAutoUpgradeOptions(); |
1016 var od = new api.AutoUpgradeOptions.fromJson(o.toJson()); | 1277 var od = new api.AutoUpgradeOptions.fromJson(o.toJson()); |
1017 checkAutoUpgradeOptions(od); | 1278 checkAutoUpgradeOptions(od); |
1018 }); | 1279 }); |
1019 }); | 1280 }); |
1020 | 1281 |
1021 | 1282 |
1022 unittest.group("obj-schema-CancelOperationRequest", () { | 1283 unittest.group("obj-schema-CancelOperationRequest", () { |
1023 unittest.test("to-json--from-json", () { | 1284 unittest.test("to-json--from-json", () { |
1024 var o = buildCancelOperationRequest(); | 1285 var o = buildCancelOperationRequest(); |
1025 var od = new api.CancelOperationRequest.fromJson(o.toJson()); | 1286 var od = new api.CancelOperationRequest.fromJson(o.toJson()); |
1026 checkCancelOperationRequest(od); | 1287 checkCancelOperationRequest(od); |
1027 }); | 1288 }); |
1028 }); | 1289 }); |
1029 | 1290 |
1030 | 1291 |
| 1292 unittest.group("obj-schema-ClientCertificateConfig", () { |
| 1293 unittest.test("to-json--from-json", () { |
| 1294 var o = buildClientCertificateConfig(); |
| 1295 var od = new api.ClientCertificateConfig.fromJson(o.toJson()); |
| 1296 checkClientCertificateConfig(od); |
| 1297 }); |
| 1298 }); |
| 1299 |
| 1300 |
1031 unittest.group("obj-schema-Cluster", () { | 1301 unittest.group("obj-schema-Cluster", () { |
1032 unittest.test("to-json--from-json", () { | 1302 unittest.test("to-json--from-json", () { |
1033 var o = buildCluster(); | 1303 var o = buildCluster(); |
1034 var od = new api.Cluster.fromJson(o.toJson()); | 1304 var od = new api.Cluster.fromJson(o.toJson()); |
1035 checkCluster(od); | 1305 checkCluster(od); |
1036 }); | 1306 }); |
1037 }); | 1307 }); |
1038 | 1308 |
1039 | 1309 |
1040 unittest.group("obj-schema-ClusterUpdate", () { | 1310 unittest.group("obj-schema-ClusterUpdate", () { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 | 1363 |
1094 unittest.group("obj-schema-HttpLoadBalancing", () { | 1364 unittest.group("obj-schema-HttpLoadBalancing", () { |
1095 unittest.test("to-json--from-json", () { | 1365 unittest.test("to-json--from-json", () { |
1096 var o = buildHttpLoadBalancing(); | 1366 var o = buildHttpLoadBalancing(); |
1097 var od = new api.HttpLoadBalancing.fromJson(o.toJson()); | 1367 var od = new api.HttpLoadBalancing.fromJson(o.toJson()); |
1098 checkHttpLoadBalancing(od); | 1368 checkHttpLoadBalancing(od); |
1099 }); | 1369 }); |
1100 }); | 1370 }); |
1101 | 1371 |
1102 | 1372 |
| 1373 unittest.group("obj-schema-IPAllocationPolicy", () { |
| 1374 unittest.test("to-json--from-json", () { |
| 1375 var o = buildIPAllocationPolicy(); |
| 1376 var od = new api.IPAllocationPolicy.fromJson(o.toJson()); |
| 1377 checkIPAllocationPolicy(od); |
| 1378 }); |
| 1379 }); |
| 1380 |
| 1381 |
1103 unittest.group("obj-schema-LegacyAbac", () { | 1382 unittest.group("obj-schema-LegacyAbac", () { |
1104 unittest.test("to-json--from-json", () { | 1383 unittest.test("to-json--from-json", () { |
1105 var o = buildLegacyAbac(); | 1384 var o = buildLegacyAbac(); |
1106 var od = new api.LegacyAbac.fromJson(o.toJson()); | 1385 var od = new api.LegacyAbac.fromJson(o.toJson()); |
1107 checkLegacyAbac(od); | 1386 checkLegacyAbac(od); |
1108 }); | 1387 }); |
1109 }); | 1388 }); |
1110 | 1389 |
1111 | 1390 |
1112 unittest.group("obj-schema-ListClustersResponse", () { | 1391 unittest.group("obj-schema-ListClustersResponse", () { |
(...skipping 25 matching lines...) Expand all Loading... |
1138 | 1417 |
1139 unittest.group("obj-schema-MasterAuth", () { | 1418 unittest.group("obj-schema-MasterAuth", () { |
1140 unittest.test("to-json--from-json", () { | 1419 unittest.test("to-json--from-json", () { |
1141 var o = buildMasterAuth(); | 1420 var o = buildMasterAuth(); |
1142 var od = new api.MasterAuth.fromJson(o.toJson()); | 1421 var od = new api.MasterAuth.fromJson(o.toJson()); |
1143 checkMasterAuth(od); | 1422 checkMasterAuth(od); |
1144 }); | 1423 }); |
1145 }); | 1424 }); |
1146 | 1425 |
1147 | 1426 |
| 1427 unittest.group("obj-schema-NetworkPolicy", () { |
| 1428 unittest.test("to-json--from-json", () { |
| 1429 var o = buildNetworkPolicy(); |
| 1430 var od = new api.NetworkPolicy.fromJson(o.toJson()); |
| 1431 checkNetworkPolicy(od); |
| 1432 }); |
| 1433 }); |
| 1434 |
| 1435 |
1148 unittest.group("obj-schema-NodeConfig", () { | 1436 unittest.group("obj-schema-NodeConfig", () { |
1149 unittest.test("to-json--from-json", () { | 1437 unittest.test("to-json--from-json", () { |
1150 var o = buildNodeConfig(); | 1438 var o = buildNodeConfig(); |
1151 var od = new api.NodeConfig.fromJson(o.toJson()); | 1439 var od = new api.NodeConfig.fromJson(o.toJson()); |
1152 checkNodeConfig(od); | 1440 checkNodeConfig(od); |
1153 }); | 1441 }); |
1154 }); | 1442 }); |
1155 | 1443 |
1156 | 1444 |
1157 unittest.group("obj-schema-NodeManagement", () { | 1445 unittest.group("obj-schema-NodeManagement", () { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 | 1489 |
1202 unittest.group("obj-schema-ServerConfig", () { | 1490 unittest.group("obj-schema-ServerConfig", () { |
1203 unittest.test("to-json--from-json", () { | 1491 unittest.test("to-json--from-json", () { |
1204 var o = buildServerConfig(); | 1492 var o = buildServerConfig(); |
1205 var od = new api.ServerConfig.fromJson(o.toJson()); | 1493 var od = new api.ServerConfig.fromJson(o.toJson()); |
1206 checkServerConfig(od); | 1494 checkServerConfig(od); |
1207 }); | 1495 }); |
1208 }); | 1496 }); |
1209 | 1497 |
1210 | 1498 |
| 1499 unittest.group("obj-schema-SetAddonsConfigRequest", () { |
| 1500 unittest.test("to-json--from-json", () { |
| 1501 var o = buildSetAddonsConfigRequest(); |
| 1502 var od = new api.SetAddonsConfigRequest.fromJson(o.toJson()); |
| 1503 checkSetAddonsConfigRequest(od); |
| 1504 }); |
| 1505 }); |
| 1506 |
| 1507 |
1211 unittest.group("obj-schema-SetLabelsRequest", () { | 1508 unittest.group("obj-schema-SetLabelsRequest", () { |
1212 unittest.test("to-json--from-json", () { | 1509 unittest.test("to-json--from-json", () { |
1213 var o = buildSetLabelsRequest(); | 1510 var o = buildSetLabelsRequest(); |
1214 var od = new api.SetLabelsRequest.fromJson(o.toJson()); | 1511 var od = new api.SetLabelsRequest.fromJson(o.toJson()); |
1215 checkSetLabelsRequest(od); | 1512 checkSetLabelsRequest(od); |
1216 }); | 1513 }); |
1217 }); | 1514 }); |
1218 | 1515 |
1219 | 1516 |
1220 unittest.group("obj-schema-SetLegacyAbacRequest", () { | 1517 unittest.group("obj-schema-SetLegacyAbacRequest", () { |
1221 unittest.test("to-json--from-json", () { | 1518 unittest.test("to-json--from-json", () { |
1222 var o = buildSetLegacyAbacRequest(); | 1519 var o = buildSetLegacyAbacRequest(); |
1223 var od = new api.SetLegacyAbacRequest.fromJson(o.toJson()); | 1520 var od = new api.SetLegacyAbacRequest.fromJson(o.toJson()); |
1224 checkSetLegacyAbacRequest(od); | 1521 checkSetLegacyAbacRequest(od); |
1225 }); | 1522 }); |
1226 }); | 1523 }); |
1227 | 1524 |
1228 | 1525 |
| 1526 unittest.group("obj-schema-SetLocationsRequest", () { |
| 1527 unittest.test("to-json--from-json", () { |
| 1528 var o = buildSetLocationsRequest(); |
| 1529 var od = new api.SetLocationsRequest.fromJson(o.toJson()); |
| 1530 checkSetLocationsRequest(od); |
| 1531 }); |
| 1532 }); |
| 1533 |
| 1534 |
| 1535 unittest.group("obj-schema-SetLoggingServiceRequest", () { |
| 1536 unittest.test("to-json--from-json", () { |
| 1537 var o = buildSetLoggingServiceRequest(); |
| 1538 var od = new api.SetLoggingServiceRequest.fromJson(o.toJson()); |
| 1539 checkSetLoggingServiceRequest(od); |
| 1540 }); |
| 1541 }); |
| 1542 |
| 1543 |
1229 unittest.group("obj-schema-SetMasterAuthRequest", () { | 1544 unittest.group("obj-schema-SetMasterAuthRequest", () { |
1230 unittest.test("to-json--from-json", () { | 1545 unittest.test("to-json--from-json", () { |
1231 var o = buildSetMasterAuthRequest(); | 1546 var o = buildSetMasterAuthRequest(); |
1232 var od = new api.SetMasterAuthRequest.fromJson(o.toJson()); | 1547 var od = new api.SetMasterAuthRequest.fromJson(o.toJson()); |
1233 checkSetMasterAuthRequest(od); | 1548 checkSetMasterAuthRequest(od); |
1234 }); | 1549 }); |
1235 }); | 1550 }); |
1236 | 1551 |
1237 | 1552 |
| 1553 unittest.group("obj-schema-SetMonitoringServiceRequest", () { |
| 1554 unittest.test("to-json--from-json", () { |
| 1555 var o = buildSetMonitoringServiceRequest(); |
| 1556 var od = new api.SetMonitoringServiceRequest.fromJson(o.toJson()); |
| 1557 checkSetMonitoringServiceRequest(od); |
| 1558 }); |
| 1559 }); |
| 1560 |
| 1561 |
| 1562 unittest.group("obj-schema-SetNetworkPolicyRequest", () { |
| 1563 unittest.test("to-json--from-json", () { |
| 1564 var o = buildSetNetworkPolicyRequest(); |
| 1565 var od = new api.SetNetworkPolicyRequest.fromJson(o.toJson()); |
| 1566 checkSetNetworkPolicyRequest(od); |
| 1567 }); |
| 1568 }); |
| 1569 |
| 1570 |
| 1571 unittest.group("obj-schema-SetNodePoolAutoscalingRequest", () { |
| 1572 unittest.test("to-json--from-json", () { |
| 1573 var o = buildSetNodePoolAutoscalingRequest(); |
| 1574 var od = new api.SetNodePoolAutoscalingRequest.fromJson(o.toJson()); |
| 1575 checkSetNodePoolAutoscalingRequest(od); |
| 1576 }); |
| 1577 }); |
| 1578 |
| 1579 |
1238 unittest.group("obj-schema-SetNodePoolManagementRequest", () { | 1580 unittest.group("obj-schema-SetNodePoolManagementRequest", () { |
1239 unittest.test("to-json--from-json", () { | 1581 unittest.test("to-json--from-json", () { |
1240 var o = buildSetNodePoolManagementRequest(); | 1582 var o = buildSetNodePoolManagementRequest(); |
1241 var od = new api.SetNodePoolManagementRequest.fromJson(o.toJson()); | 1583 var od = new api.SetNodePoolManagementRequest.fromJson(o.toJson()); |
1242 checkSetNodePoolManagementRequest(od); | 1584 checkSetNodePoolManagementRequest(od); |
1243 }); | 1585 }); |
1244 }); | 1586 }); |
1245 | 1587 |
1246 | 1588 |
| 1589 unittest.group("obj-schema-SetNodePoolSizeRequest", () { |
| 1590 unittest.test("to-json--from-json", () { |
| 1591 var o = buildSetNodePoolSizeRequest(); |
| 1592 var od = new api.SetNodePoolSizeRequest.fromJson(o.toJson()); |
| 1593 checkSetNodePoolSizeRequest(od); |
| 1594 }); |
| 1595 }); |
| 1596 |
| 1597 |
1247 unittest.group("obj-schema-StartIPRotationRequest", () { | 1598 unittest.group("obj-schema-StartIPRotationRequest", () { |
1248 unittest.test("to-json--from-json", () { | 1599 unittest.test("to-json--from-json", () { |
1249 var o = buildStartIPRotationRequest(); | 1600 var o = buildStartIPRotationRequest(); |
1250 var od = new api.StartIPRotationRequest.fromJson(o.toJson()); | 1601 var od = new api.StartIPRotationRequest.fromJson(o.toJson()); |
1251 checkStartIPRotationRequest(od); | 1602 checkStartIPRotationRequest(od); |
1252 }); | 1603 }); |
1253 }); | 1604 }); |
1254 | 1605 |
1255 | 1606 |
1256 unittest.group("obj-schema-UpdateClusterRequest", () { | 1607 unittest.group("obj-schema-UpdateClusterRequest", () { |
1257 unittest.test("to-json--from-json", () { | 1608 unittest.test("to-json--from-json", () { |
1258 var o = buildUpdateClusterRequest(); | 1609 var o = buildUpdateClusterRequest(); |
1259 var od = new api.UpdateClusterRequest.fromJson(o.toJson()); | 1610 var od = new api.UpdateClusterRequest.fromJson(o.toJson()); |
1260 checkUpdateClusterRequest(od); | 1611 checkUpdateClusterRequest(od); |
1261 }); | 1612 }); |
1262 }); | 1613 }); |
1263 | 1614 |
1264 | 1615 |
| 1616 unittest.group("obj-schema-UpdateMasterRequest", () { |
| 1617 unittest.test("to-json--from-json", () { |
| 1618 var o = buildUpdateMasterRequest(); |
| 1619 var od = new api.UpdateMasterRequest.fromJson(o.toJson()); |
| 1620 checkUpdateMasterRequest(od); |
| 1621 }); |
| 1622 }); |
| 1623 |
| 1624 |
| 1625 unittest.group("obj-schema-UpdateNodePoolRequest", () { |
| 1626 unittest.test("to-json--from-json", () { |
| 1627 var o = buildUpdateNodePoolRequest(); |
| 1628 var od = new api.UpdateNodePoolRequest.fromJson(o.toJson()); |
| 1629 checkUpdateNodePoolRequest(od); |
| 1630 }); |
| 1631 }); |
| 1632 |
| 1633 |
1265 unittest.group("resource-ProjectsZonesResourceApi", () { | 1634 unittest.group("resource-ProjectsZonesResourceApi", () { |
1266 unittest.test("method--getServerconfig", () { | 1635 unittest.test("method--getServerconfig", () { |
1267 | 1636 |
1268 var mock = new HttpServerMock(); | 1637 var mock = new HttpServerMock(); |
1269 api.ProjectsZonesResourceApi res = new api.ContainerApi(mock).projects.zon
es; | 1638 api.ProjectsZonesResourceApi res = new api.ContainerApi(mock).projects.zon
es; |
1270 var arg_projectId = "foo"; | 1639 var arg_projectId = "foo"; |
1271 var arg_zone = "foo"; | 1640 var arg_zone = "foo"; |
1272 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1641 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1273 var path = (req.url).path; | 1642 var path = (req.url).path; |
1274 var pathOffset = 0; | 1643 var pathOffset = 0; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 }), true); | 1688 }), true); |
1320 res.getServerconfig(arg_projectId, arg_zone).then(unittest.expectAsync1(((
api.ServerConfig response) { | 1689 res.getServerconfig(arg_projectId, arg_zone).then(unittest.expectAsync1(((
api.ServerConfig response) { |
1321 checkServerConfig(response); | 1690 checkServerConfig(response); |
1322 }))); | 1691 }))); |
1323 }); | 1692 }); |
1324 | 1693 |
1325 }); | 1694 }); |
1326 | 1695 |
1327 | 1696 |
1328 unittest.group("resource-ProjectsZonesClustersResourceApi", () { | 1697 unittest.group("resource-ProjectsZonesClustersResourceApi", () { |
| 1698 unittest.test("method--addons", () { |
| 1699 |
| 1700 var mock = new HttpServerMock(); |
| 1701 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
| 1702 var arg_request = buildSetAddonsConfigRequest(); |
| 1703 var arg_projectId = "foo"; |
| 1704 var arg_zone = "foo"; |
| 1705 var arg_clusterId = "foo"; |
| 1706 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1707 var obj = new api.SetAddonsConfigRequest.fromJson(json); |
| 1708 checkSetAddonsConfigRequest(obj); |
| 1709 |
| 1710 var path = (req.url).path; |
| 1711 var pathOffset = 0; |
| 1712 var index; |
| 1713 var subPart; |
| 1714 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1715 pathOffset += 1; |
| 1716 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1717 pathOffset += 12; |
| 1718 index = path.indexOf("/zones/", pathOffset); |
| 1719 unittest.expect(index >= 0, unittest.isTrue); |
| 1720 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1721 pathOffset = index; |
| 1722 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 1723 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 1724 pathOffset += 7; |
| 1725 index = path.indexOf("/clusters/", pathOffset); |
| 1726 unittest.expect(index >= 0, unittest.isTrue); |
| 1727 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1728 pathOffset = index; |
| 1729 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 1730 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 1731 pathOffset += 10; |
| 1732 index = path.indexOf("/addons", pathOffset); |
| 1733 unittest.expect(index >= 0, unittest.isTrue); |
| 1734 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1735 pathOffset = index; |
| 1736 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 1737 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/addons")); |
| 1738 pathOffset += 7; |
| 1739 |
| 1740 var query = (req.url).query; |
| 1741 var queryOffset = 0; |
| 1742 var queryMap = {}; |
| 1743 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1744 parseBool(n) { |
| 1745 if (n == "true") return true; |
| 1746 if (n == "false") return false; |
| 1747 if (n == null) return null; |
| 1748 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1749 } |
| 1750 if (query.length > 0) { |
| 1751 for (var part in query.split("&")) { |
| 1752 var keyvalue = part.split("="); |
| 1753 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1754 } |
| 1755 } |
| 1756 |
| 1757 |
| 1758 var h = { |
| 1759 "content-type" : "application/json; charset=utf-8", |
| 1760 }; |
| 1761 var resp = convert.JSON.encode(buildOperation()); |
| 1762 return new async.Future.value(stringResponse(200, h, resp)); |
| 1763 }), true); |
| 1764 res.addons(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync1(((api.Operation response) { |
| 1765 checkOperation(response); |
| 1766 }))); |
| 1767 }); |
| 1768 |
1329 unittest.test("method--completeIpRotation", () { | 1769 unittest.test("method--completeIpRotation", () { |
1330 | 1770 |
1331 var mock = new HttpServerMock(); | 1771 var mock = new HttpServerMock(); |
1332 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 1772 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1333 var arg_request = buildCompleteIPRotationRequest(); | 1773 var arg_request = buildCompleteIPRotationRequest(); |
1334 var arg_projectId = "foo"; | 1774 var arg_projectId = "foo"; |
1335 var arg_zone = "foo"; | 1775 var arg_zone = "foo"; |
1336 var arg_clusterId = "foo"; | 1776 var arg_clusterId = "foo"; |
1337 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1777 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1338 var obj = new api.CompleteIPRotationRequest.fromJson(json); | 1778 var obj = new api.CompleteIPRotationRequest.fromJson(json); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 "content-type" : "application/json; charset=utf-8", | 2149 "content-type" : "application/json; charset=utf-8", |
1710 }; | 2150 }; |
1711 var resp = convert.JSON.encode(buildListClustersResponse()); | 2151 var resp = convert.JSON.encode(buildListClustersResponse()); |
1712 return new async.Future.value(stringResponse(200, h, resp)); | 2152 return new async.Future.value(stringResponse(200, h, resp)); |
1713 }), true); | 2153 }), true); |
1714 res.list(arg_projectId, arg_zone).then(unittest.expectAsync1(((api.ListClu
stersResponse response) { | 2154 res.list(arg_projectId, arg_zone).then(unittest.expectAsync1(((api.ListClu
stersResponse response) { |
1715 checkListClustersResponse(response); | 2155 checkListClustersResponse(response); |
1716 }))); | 2156 }))); |
1717 }); | 2157 }); |
1718 | 2158 |
1719 unittest.test("method--resourceLabels", () { | 2159 unittest.test("method--locations", () { |
1720 | 2160 |
1721 var mock = new HttpServerMock(); | 2161 var mock = new HttpServerMock(); |
1722 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 2162 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1723 var arg_request = buildSetLabelsRequest(); | 2163 var arg_request = buildSetLocationsRequest(); |
1724 var arg_projectId = "foo"; | 2164 var arg_projectId = "foo"; |
1725 var arg_zone = "foo"; | 2165 var arg_zone = "foo"; |
1726 var arg_clusterId = "foo"; | 2166 var arg_clusterId = "foo"; |
1727 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2167 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1728 var obj = new api.SetLabelsRequest.fromJson(json); | 2168 var obj = new api.SetLocationsRequest.fromJson(json); |
1729 checkSetLabelsRequest(obj); | 2169 checkSetLocationsRequest(obj); |
1730 | 2170 |
1731 var path = (req.url).path; | 2171 var path = (req.url).path; |
1732 var pathOffset = 0; | 2172 var pathOffset = 0; |
1733 var index; | 2173 var index; |
1734 var subPart; | 2174 var subPart; |
1735 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2175 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1736 pathOffset += 1; | 2176 pathOffset += 1; |
1737 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2177 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1738 pathOffset += 12; | 2178 pathOffset += 12; |
1739 index = path.indexOf("/zones/", pathOffset); | 2179 index = path.indexOf("/zones/", pathOffset); |
1740 unittest.expect(index >= 0, unittest.isTrue); | 2180 unittest.expect(index >= 0, unittest.isTrue); |
1741 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2181 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1742 pathOffset = index; | 2182 pathOffset = index; |
1743 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2183 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
1744 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 2184 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
1745 pathOffset += 7; | 2185 pathOffset += 7; |
1746 index = path.indexOf("/clusters/", pathOffset); | 2186 index = path.indexOf("/clusters/", pathOffset); |
1747 unittest.expect(index >= 0, unittest.isTrue); | 2187 unittest.expect(index >= 0, unittest.isTrue); |
1748 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2188 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1749 pathOffset = index; | 2189 pathOffset = index; |
1750 unittest.expect(subPart, unittest.equals("$arg_zone")); | 2190 unittest.expect(subPart, unittest.equals("$arg_zone")); |
1751 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); | 2191 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
1752 pathOffset += 10; | 2192 pathOffset += 10; |
1753 index = path.indexOf("/resourceLabels", pathOffset); | 2193 index = path.indexOf("/locations", pathOffset); |
1754 unittest.expect(index >= 0, unittest.isTrue); | 2194 unittest.expect(index >= 0, unittest.isTrue); |
1755 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2195 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1756 pathOffset = index; | 2196 pathOffset = index; |
1757 unittest.expect(subPart, unittest.equals("$arg_clusterId")); | 2197 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
1758 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/resourceLabels")); | 2198 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/locations")); |
1759 pathOffset += 15; | 2199 pathOffset += 10; |
1760 | 2200 |
1761 var query = (req.url).query; | 2201 var query = (req.url).query; |
1762 var queryOffset = 0; | 2202 var queryOffset = 0; |
1763 var queryMap = {}; | 2203 var queryMap = {}; |
1764 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2204 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1765 parseBool(n) { | 2205 parseBool(n) { |
1766 if (n == "true") return true; | 2206 if (n == "true") return true; |
1767 if (n == "false") return false; | 2207 if (n == "false") return false; |
1768 if (n == null) return null; | 2208 if (n == null) return null; |
1769 throw new core.ArgumentError("Invalid boolean: $n"); | 2209 throw new core.ArgumentError("Invalid boolean: $n"); |
1770 } | 2210 } |
1771 if (query.length > 0) { | 2211 if (query.length > 0) { |
1772 for (var part in query.split("&")) { | 2212 for (var part in query.split("&")) { |
1773 var keyvalue = part.split("="); | 2213 var keyvalue = part.split("="); |
1774 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2214 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1775 } | 2215 } |
1776 } | 2216 } |
1777 | 2217 |
1778 | 2218 |
1779 var h = { | 2219 var h = { |
1780 "content-type" : "application/json; charset=utf-8", | 2220 "content-type" : "application/json; charset=utf-8", |
1781 }; | 2221 }; |
1782 var resp = convert.JSON.encode(buildOperation()); | 2222 var resp = convert.JSON.encode(buildOperation()); |
1783 return new async.Future.value(stringResponse(200, h, resp)); | 2223 return new async.Future.value(stringResponse(200, h, resp)); |
1784 }), true); | 2224 }), true); |
1785 res.resourceLabels(arg_request, arg_projectId, arg_zone, arg_clusterId).th
en(unittest.expectAsync1(((api.Operation response) { | 2225 res.locations(arg_request, arg_projectId, arg_zone, arg_clusterId).then(un
ittest.expectAsync1(((api.Operation response) { |
1786 checkOperation(response); | 2226 checkOperation(response); |
1787 }))); | 2227 }))); |
1788 }); | 2228 }); |
1789 | 2229 |
1790 unittest.test("method--setMasterAuth", () { | 2230 unittest.test("method--logging", () { |
1791 | 2231 |
1792 var mock = new HttpServerMock(); | 2232 var mock = new HttpServerMock(); |
1793 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 2233 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1794 var arg_request = buildSetMasterAuthRequest(); | 2234 var arg_request = buildSetLoggingServiceRequest(); |
1795 var arg_projectId = "foo"; | 2235 var arg_projectId = "foo"; |
1796 var arg_zone = "foo"; | 2236 var arg_zone = "foo"; |
1797 var arg_clusterId = "foo"; | 2237 var arg_clusterId = "foo"; |
1798 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2238 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1799 var obj = new api.SetMasterAuthRequest.fromJson(json); | 2239 var obj = new api.SetLoggingServiceRequest.fromJson(json); |
1800 checkSetMasterAuthRequest(obj); | 2240 checkSetLoggingServiceRequest(obj); |
1801 | 2241 |
1802 var path = (req.url).path; | 2242 var path = (req.url).path; |
1803 var pathOffset = 0; | 2243 var pathOffset = 0; |
1804 var index; | 2244 var index; |
1805 var subPart; | 2245 var subPart; |
1806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2246 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1807 pathOffset += 1; | 2247 pathOffset += 1; |
1808 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2248 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1809 pathOffset += 12; | 2249 pathOffset += 12; |
1810 index = path.indexOf("/zones/", pathOffset); | 2250 index = path.indexOf("/zones/", pathOffset); |
1811 unittest.expect(index >= 0, unittest.isTrue); | 2251 unittest.expect(index >= 0, unittest.isTrue); |
1812 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2252 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1813 pathOffset = index; | 2253 pathOffset = index; |
1814 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2254 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
1815 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 2255 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
1816 pathOffset += 7; | 2256 pathOffset += 7; |
1817 index = path.indexOf("/clusters/", pathOffset); | 2257 index = path.indexOf("/clusters/", pathOffset); |
1818 unittest.expect(index >= 0, unittest.isTrue); | 2258 unittest.expect(index >= 0, unittest.isTrue); |
1819 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2259 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1820 pathOffset = index; | 2260 pathOffset = index; |
1821 unittest.expect(subPart, unittest.equals("$arg_zone")); | 2261 unittest.expect(subPart, unittest.equals("$arg_zone")); |
1822 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); | 2262 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
1823 pathOffset += 10; | 2263 pathOffset += 10; |
1824 index = path.indexOf(":setMasterAuth", pathOffset); | 2264 index = path.indexOf("/logging", pathOffset); |
1825 unittest.expect(index >= 0, unittest.isTrue); | 2265 unittest.expect(index >= 0, unittest.isTrue); |
1826 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2266 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1827 pathOffset = index; | 2267 pathOffset = index; |
1828 unittest.expect(subPart, unittest.equals("$arg_clusterId")); | 2268 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
1829 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals(":setMasterAuth")); | 2269 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/logging")); |
1830 pathOffset += 14; | 2270 pathOffset += 8; |
1831 | 2271 |
1832 var query = (req.url).query; | 2272 var query = (req.url).query; |
1833 var queryOffset = 0; | 2273 var queryOffset = 0; |
1834 var queryMap = {}; | 2274 var queryMap = {}; |
1835 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2275 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1836 parseBool(n) { | 2276 parseBool(n) { |
1837 if (n == "true") return true; | 2277 if (n == "true") return true; |
1838 if (n == "false") return false; | 2278 if (n == "false") return false; |
1839 if (n == null) return null; | 2279 if (n == null) return null; |
1840 throw new core.ArgumentError("Invalid boolean: $n"); | 2280 throw new core.ArgumentError("Invalid boolean: $n"); |
1841 } | 2281 } |
1842 if (query.length > 0) { | 2282 if (query.length > 0) { |
1843 for (var part in query.split("&")) { | 2283 for (var part in query.split("&")) { |
1844 var keyvalue = part.split("="); | 2284 var keyvalue = part.split("="); |
1845 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2285 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1846 } | 2286 } |
1847 } | 2287 } |
1848 | 2288 |
1849 | 2289 |
1850 var h = { | 2290 var h = { |
1851 "content-type" : "application/json; charset=utf-8", | 2291 "content-type" : "application/json; charset=utf-8", |
1852 }; | 2292 }; |
1853 var resp = convert.JSON.encode(buildOperation()); | 2293 var resp = convert.JSON.encode(buildOperation()); |
1854 return new async.Future.value(stringResponse(200, h, resp)); | 2294 return new async.Future.value(stringResponse(200, h, resp)); |
1855 }), true); | 2295 }), true); |
| 2296 res.logging(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unit
test.expectAsync1(((api.Operation response) { |
| 2297 checkOperation(response); |
| 2298 }))); |
| 2299 }); |
| 2300 |
| 2301 unittest.test("method--master", () { |
| 2302 |
| 2303 var mock = new HttpServerMock(); |
| 2304 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
| 2305 var arg_request = buildUpdateMasterRequest(); |
| 2306 var arg_projectId = "foo"; |
| 2307 var arg_zone = "foo"; |
| 2308 var arg_clusterId = "foo"; |
| 2309 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2310 var obj = new api.UpdateMasterRequest.fromJson(json); |
| 2311 checkUpdateMasterRequest(obj); |
| 2312 |
| 2313 var path = (req.url).path; |
| 2314 var pathOffset = 0; |
| 2315 var index; |
| 2316 var subPart; |
| 2317 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2318 pathOffset += 1; |
| 2319 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2320 pathOffset += 12; |
| 2321 index = path.indexOf("/zones/", pathOffset); |
| 2322 unittest.expect(index >= 0, unittest.isTrue); |
| 2323 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2324 pathOffset = index; |
| 2325 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2326 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 2327 pathOffset += 7; |
| 2328 index = path.indexOf("/clusters/", pathOffset); |
| 2329 unittest.expect(index >= 0, unittest.isTrue); |
| 2330 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2331 pathOffset = index; |
| 2332 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 2333 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 2334 pathOffset += 10; |
| 2335 index = path.indexOf("/master", pathOffset); |
| 2336 unittest.expect(index >= 0, unittest.isTrue); |
| 2337 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2338 pathOffset = index; |
| 2339 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 2340 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/master")); |
| 2341 pathOffset += 7; |
| 2342 |
| 2343 var query = (req.url).query; |
| 2344 var queryOffset = 0; |
| 2345 var queryMap = {}; |
| 2346 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2347 parseBool(n) { |
| 2348 if (n == "true") return true; |
| 2349 if (n == "false") return false; |
| 2350 if (n == null) return null; |
| 2351 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2352 } |
| 2353 if (query.length > 0) { |
| 2354 for (var part in query.split("&")) { |
| 2355 var keyvalue = part.split("="); |
| 2356 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2357 } |
| 2358 } |
| 2359 |
| 2360 |
| 2361 var h = { |
| 2362 "content-type" : "application/json; charset=utf-8", |
| 2363 }; |
| 2364 var resp = convert.JSON.encode(buildOperation()); |
| 2365 return new async.Future.value(stringResponse(200, h, resp)); |
| 2366 }), true); |
| 2367 res.master(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync1(((api.Operation response) { |
| 2368 checkOperation(response); |
| 2369 }))); |
| 2370 }); |
| 2371 |
| 2372 unittest.test("method--monitoring", () { |
| 2373 |
| 2374 var mock = new HttpServerMock(); |
| 2375 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
| 2376 var arg_request = buildSetMonitoringServiceRequest(); |
| 2377 var arg_projectId = "foo"; |
| 2378 var arg_zone = "foo"; |
| 2379 var arg_clusterId = "foo"; |
| 2380 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2381 var obj = new api.SetMonitoringServiceRequest.fromJson(json); |
| 2382 checkSetMonitoringServiceRequest(obj); |
| 2383 |
| 2384 var path = (req.url).path; |
| 2385 var pathOffset = 0; |
| 2386 var index; |
| 2387 var subPart; |
| 2388 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2389 pathOffset += 1; |
| 2390 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2391 pathOffset += 12; |
| 2392 index = path.indexOf("/zones/", pathOffset); |
| 2393 unittest.expect(index >= 0, unittest.isTrue); |
| 2394 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2395 pathOffset = index; |
| 2396 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2397 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 2398 pathOffset += 7; |
| 2399 index = path.indexOf("/clusters/", pathOffset); |
| 2400 unittest.expect(index >= 0, unittest.isTrue); |
| 2401 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2402 pathOffset = index; |
| 2403 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 2404 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 2405 pathOffset += 10; |
| 2406 index = path.indexOf("/monitoring", pathOffset); |
| 2407 unittest.expect(index >= 0, unittest.isTrue); |
| 2408 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2409 pathOffset = index; |
| 2410 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 2411 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/monitoring")); |
| 2412 pathOffset += 11; |
| 2413 |
| 2414 var query = (req.url).query; |
| 2415 var queryOffset = 0; |
| 2416 var queryMap = {}; |
| 2417 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2418 parseBool(n) { |
| 2419 if (n == "true") return true; |
| 2420 if (n == "false") return false; |
| 2421 if (n == null) return null; |
| 2422 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2423 } |
| 2424 if (query.length > 0) { |
| 2425 for (var part in query.split("&")) { |
| 2426 var keyvalue = part.split("="); |
| 2427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2428 } |
| 2429 } |
| 2430 |
| 2431 |
| 2432 var h = { |
| 2433 "content-type" : "application/json; charset=utf-8", |
| 2434 }; |
| 2435 var resp = convert.JSON.encode(buildOperation()); |
| 2436 return new async.Future.value(stringResponse(200, h, resp)); |
| 2437 }), true); |
| 2438 res.monitoring(arg_request, arg_projectId, arg_zone, arg_clusterId).then(u
nittest.expectAsync1(((api.Operation response) { |
| 2439 checkOperation(response); |
| 2440 }))); |
| 2441 }); |
| 2442 |
| 2443 unittest.test("method--resourceLabels", () { |
| 2444 |
| 2445 var mock = new HttpServerMock(); |
| 2446 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
| 2447 var arg_request = buildSetLabelsRequest(); |
| 2448 var arg_projectId = "foo"; |
| 2449 var arg_zone = "foo"; |
| 2450 var arg_clusterId = "foo"; |
| 2451 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2452 var obj = new api.SetLabelsRequest.fromJson(json); |
| 2453 checkSetLabelsRequest(obj); |
| 2454 |
| 2455 var path = (req.url).path; |
| 2456 var pathOffset = 0; |
| 2457 var index; |
| 2458 var subPart; |
| 2459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2460 pathOffset += 1; |
| 2461 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2462 pathOffset += 12; |
| 2463 index = path.indexOf("/zones/", pathOffset); |
| 2464 unittest.expect(index >= 0, unittest.isTrue); |
| 2465 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2466 pathOffset = index; |
| 2467 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2468 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 2469 pathOffset += 7; |
| 2470 index = path.indexOf("/clusters/", pathOffset); |
| 2471 unittest.expect(index >= 0, unittest.isTrue); |
| 2472 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2473 pathOffset = index; |
| 2474 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 2475 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 2476 pathOffset += 10; |
| 2477 index = path.indexOf("/resourceLabels", pathOffset); |
| 2478 unittest.expect(index >= 0, unittest.isTrue); |
| 2479 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2480 pathOffset = index; |
| 2481 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 2482 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/resourceLabels")); |
| 2483 pathOffset += 15; |
| 2484 |
| 2485 var query = (req.url).query; |
| 2486 var queryOffset = 0; |
| 2487 var queryMap = {}; |
| 2488 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2489 parseBool(n) { |
| 2490 if (n == "true") return true; |
| 2491 if (n == "false") return false; |
| 2492 if (n == null) return null; |
| 2493 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2494 } |
| 2495 if (query.length > 0) { |
| 2496 for (var part in query.split("&")) { |
| 2497 var keyvalue = part.split("="); |
| 2498 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2499 } |
| 2500 } |
| 2501 |
| 2502 |
| 2503 var h = { |
| 2504 "content-type" : "application/json; charset=utf-8", |
| 2505 }; |
| 2506 var resp = convert.JSON.encode(buildOperation()); |
| 2507 return new async.Future.value(stringResponse(200, h, resp)); |
| 2508 }), true); |
| 2509 res.resourceLabels(arg_request, arg_projectId, arg_zone, arg_clusterId).th
en(unittest.expectAsync1(((api.Operation response) { |
| 2510 checkOperation(response); |
| 2511 }))); |
| 2512 }); |
| 2513 |
| 2514 unittest.test("method--setMasterAuth", () { |
| 2515 |
| 2516 var mock = new HttpServerMock(); |
| 2517 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
| 2518 var arg_request = buildSetMasterAuthRequest(); |
| 2519 var arg_projectId = "foo"; |
| 2520 var arg_zone = "foo"; |
| 2521 var arg_clusterId = "foo"; |
| 2522 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2523 var obj = new api.SetMasterAuthRequest.fromJson(json); |
| 2524 checkSetMasterAuthRequest(obj); |
| 2525 |
| 2526 var path = (req.url).path; |
| 2527 var pathOffset = 0; |
| 2528 var index; |
| 2529 var subPart; |
| 2530 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2531 pathOffset += 1; |
| 2532 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2533 pathOffset += 12; |
| 2534 index = path.indexOf("/zones/", pathOffset); |
| 2535 unittest.expect(index >= 0, unittest.isTrue); |
| 2536 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2537 pathOffset = index; |
| 2538 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2539 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 2540 pathOffset += 7; |
| 2541 index = path.indexOf("/clusters/", pathOffset); |
| 2542 unittest.expect(index >= 0, unittest.isTrue); |
| 2543 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2544 pathOffset = index; |
| 2545 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 2546 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 2547 pathOffset += 10; |
| 2548 index = path.indexOf(":setMasterAuth", pathOffset); |
| 2549 unittest.expect(index >= 0, unittest.isTrue); |
| 2550 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2551 pathOffset = index; |
| 2552 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 2553 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals(":setMasterAuth")); |
| 2554 pathOffset += 14; |
| 2555 |
| 2556 var query = (req.url).query; |
| 2557 var queryOffset = 0; |
| 2558 var queryMap = {}; |
| 2559 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2560 parseBool(n) { |
| 2561 if (n == "true") return true; |
| 2562 if (n == "false") return false; |
| 2563 if (n == null) return null; |
| 2564 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2565 } |
| 2566 if (query.length > 0) { |
| 2567 for (var part in query.split("&")) { |
| 2568 var keyvalue = part.split("="); |
| 2569 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2570 } |
| 2571 } |
| 2572 |
| 2573 |
| 2574 var h = { |
| 2575 "content-type" : "application/json; charset=utf-8", |
| 2576 }; |
| 2577 var resp = convert.JSON.encode(buildOperation()); |
| 2578 return new async.Future.value(stringResponse(200, h, resp)); |
| 2579 }), true); |
1856 res.setMasterAuth(arg_request, arg_projectId, arg_zone, arg_clusterId).the
n(unittest.expectAsync1(((api.Operation response) { | 2580 res.setMasterAuth(arg_request, arg_projectId, arg_zone, arg_clusterId).the
n(unittest.expectAsync1(((api.Operation response) { |
1857 checkOperation(response); | 2581 checkOperation(response); |
1858 }))); | 2582 }))); |
1859 }); | 2583 }); |
1860 | 2584 |
| 2585 unittest.test("method--setNetworkPolicy", () { |
| 2586 |
| 2587 var mock = new HttpServerMock(); |
| 2588 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
| 2589 var arg_request = buildSetNetworkPolicyRequest(); |
| 2590 var arg_projectId = "foo"; |
| 2591 var arg_zone = "foo"; |
| 2592 var arg_clusterId = "foo"; |
| 2593 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2594 var obj = new api.SetNetworkPolicyRequest.fromJson(json); |
| 2595 checkSetNetworkPolicyRequest(obj); |
| 2596 |
| 2597 var path = (req.url).path; |
| 2598 var pathOffset = 0; |
| 2599 var index; |
| 2600 var subPart; |
| 2601 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2602 pathOffset += 1; |
| 2603 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2604 pathOffset += 12; |
| 2605 index = path.indexOf("/zones/", pathOffset); |
| 2606 unittest.expect(index >= 0, unittest.isTrue); |
| 2607 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2608 pathOffset = index; |
| 2609 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2610 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 2611 pathOffset += 7; |
| 2612 index = path.indexOf("/clusters/", pathOffset); |
| 2613 unittest.expect(index >= 0, unittest.isTrue); |
| 2614 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2615 pathOffset = index; |
| 2616 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 2617 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 2618 pathOffset += 10; |
| 2619 index = path.indexOf(":setNetworkPolicy", pathOffset); |
| 2620 unittest.expect(index >= 0, unittest.isTrue); |
| 2621 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2622 pathOffset = index; |
| 2623 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 2624 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals(":setNetworkPolicy")); |
| 2625 pathOffset += 17; |
| 2626 |
| 2627 var query = (req.url).query; |
| 2628 var queryOffset = 0; |
| 2629 var queryMap = {}; |
| 2630 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2631 parseBool(n) { |
| 2632 if (n == "true") return true; |
| 2633 if (n == "false") return false; |
| 2634 if (n == null) return null; |
| 2635 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2636 } |
| 2637 if (query.length > 0) { |
| 2638 for (var part in query.split("&")) { |
| 2639 var keyvalue = part.split("="); |
| 2640 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2641 } |
| 2642 } |
| 2643 |
| 2644 |
| 2645 var h = { |
| 2646 "content-type" : "application/json; charset=utf-8", |
| 2647 }; |
| 2648 var resp = convert.JSON.encode(buildOperation()); |
| 2649 return new async.Future.value(stringResponse(200, h, resp)); |
| 2650 }), true); |
| 2651 res.setNetworkPolicy(arg_request, arg_projectId, arg_zone, arg_clusterId).
then(unittest.expectAsync1(((api.Operation response) { |
| 2652 checkOperation(response); |
| 2653 }))); |
| 2654 }); |
| 2655 |
1861 unittest.test("method--startIpRotation", () { | 2656 unittest.test("method--startIpRotation", () { |
1862 | 2657 |
1863 var mock = new HttpServerMock(); | 2658 var mock = new HttpServerMock(); |
1864 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; | 2659 api.ProjectsZonesClustersResourceApi res = new api.ContainerApi(mock).proj
ects.zones.clusters; |
1865 var arg_request = buildStartIPRotationRequest(); | 2660 var arg_request = buildStartIPRotationRequest(); |
1866 var arg_projectId = "foo"; | 2661 var arg_projectId = "foo"; |
1867 var arg_zone = "foo"; | 2662 var arg_zone = "foo"; |
1868 var arg_clusterId = "foo"; | 2663 var arg_clusterId = "foo"; |
1869 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2664 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1870 var obj = new api.StartIPRotationRequest.fromJson(json); | 2665 var obj = new api.StartIPRotationRequest.fromJson(json); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 }), true); | 2788 }), true); |
1994 res.update(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync1(((api.Operation response) { | 2789 res.update(arg_request, arg_projectId, arg_zone, arg_clusterId).then(unitt
est.expectAsync1(((api.Operation response) { |
1995 checkOperation(response); | 2790 checkOperation(response); |
1996 }))); | 2791 }))); |
1997 }); | 2792 }); |
1998 | 2793 |
1999 }); | 2794 }); |
2000 | 2795 |
2001 | 2796 |
2002 unittest.group("resource-ProjectsZonesClustersNodePoolsResourceApi", () { | 2797 unittest.group("resource-ProjectsZonesClustersNodePoolsResourceApi", () { |
| 2798 unittest.test("method--autoscaling", () { |
| 2799 |
| 2800 var mock = new HttpServerMock(); |
| 2801 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
| 2802 var arg_request = buildSetNodePoolAutoscalingRequest(); |
| 2803 var arg_projectId = "foo"; |
| 2804 var arg_zone = "foo"; |
| 2805 var arg_clusterId = "foo"; |
| 2806 var arg_nodePoolId = "foo"; |
| 2807 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2808 var obj = new api.SetNodePoolAutoscalingRequest.fromJson(json); |
| 2809 checkSetNodePoolAutoscalingRequest(obj); |
| 2810 |
| 2811 var path = (req.url).path; |
| 2812 var pathOffset = 0; |
| 2813 var index; |
| 2814 var subPart; |
| 2815 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2816 pathOffset += 1; |
| 2817 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2818 pathOffset += 12; |
| 2819 index = path.indexOf("/zones/", pathOffset); |
| 2820 unittest.expect(index >= 0, unittest.isTrue); |
| 2821 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2822 pathOffset = index; |
| 2823 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2824 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 2825 pathOffset += 7; |
| 2826 index = path.indexOf("/clusters/", pathOffset); |
| 2827 unittest.expect(index >= 0, unittest.isTrue); |
| 2828 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2829 pathOffset = index; |
| 2830 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 2831 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 2832 pathOffset += 10; |
| 2833 index = path.indexOf("/nodePools/", pathOffset); |
| 2834 unittest.expect(index >= 0, unittest.isTrue); |
| 2835 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2836 pathOffset = index; |
| 2837 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 2838 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/nodePools/")); |
| 2839 pathOffset += 11; |
| 2840 index = path.indexOf("/autoscaling", pathOffset); |
| 2841 unittest.expect(index >= 0, unittest.isTrue); |
| 2842 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2843 pathOffset = index; |
| 2844 unittest.expect(subPart, unittest.equals("$arg_nodePoolId")); |
| 2845 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/autoscaling")); |
| 2846 pathOffset += 12; |
| 2847 |
| 2848 var query = (req.url).query; |
| 2849 var queryOffset = 0; |
| 2850 var queryMap = {}; |
| 2851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2852 parseBool(n) { |
| 2853 if (n == "true") return true; |
| 2854 if (n == "false") return false; |
| 2855 if (n == null) return null; |
| 2856 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2857 } |
| 2858 if (query.length > 0) { |
| 2859 for (var part in query.split("&")) { |
| 2860 var keyvalue = part.split("="); |
| 2861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2862 } |
| 2863 } |
| 2864 |
| 2865 |
| 2866 var h = { |
| 2867 "content-type" : "application/json; charset=utf-8", |
| 2868 }; |
| 2869 var resp = convert.JSON.encode(buildOperation()); |
| 2870 return new async.Future.value(stringResponse(200, h, resp)); |
| 2871 }), true); |
| 2872 res.autoscaling(arg_request, arg_projectId, arg_zone, arg_clusterId, arg_n
odePoolId).then(unittest.expectAsync1(((api.Operation response) { |
| 2873 checkOperation(response); |
| 2874 }))); |
| 2875 }); |
| 2876 |
2003 unittest.test("method--create", () { | 2877 unittest.test("method--create", () { |
2004 | 2878 |
2005 var mock = new HttpServerMock(); | 2879 var mock = new HttpServerMock(); |
2006 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; | 2880 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
2007 var arg_request = buildCreateNodePoolRequest(); | 2881 var arg_request = buildCreateNodePoolRequest(); |
2008 var arg_projectId = "foo"; | 2882 var arg_projectId = "foo"; |
2009 var arg_zone = "foo"; | 2883 var arg_zone = "foo"; |
2010 var arg_clusterId = "foo"; | 2884 var arg_clusterId = "foo"; |
2011 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2885 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2012 var obj = new api.CreateNodePoolRequest.fromJson(json); | 2886 var obj = new api.CreateNodePoolRequest.fromJson(json); |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 "content-type" : "application/json; charset=utf-8", | 3305 "content-type" : "application/json; charset=utf-8", |
2432 }; | 3306 }; |
2433 var resp = convert.JSON.encode(buildOperation()); | 3307 var resp = convert.JSON.encode(buildOperation()); |
2434 return new async.Future.value(stringResponse(200, h, resp)); | 3308 return new async.Future.value(stringResponse(200, h, resp)); |
2435 }), true); | 3309 }), true); |
2436 res.setManagement(arg_request, arg_projectId, arg_zone, arg_clusterId, arg
_nodePoolId).then(unittest.expectAsync1(((api.Operation response) { | 3310 res.setManagement(arg_request, arg_projectId, arg_zone, arg_clusterId, arg
_nodePoolId).then(unittest.expectAsync1(((api.Operation response) { |
2437 checkOperation(response); | 3311 checkOperation(response); |
2438 }))); | 3312 }))); |
2439 }); | 3313 }); |
2440 | 3314 |
| 3315 unittest.test("method--setSize", () { |
| 3316 |
| 3317 var mock = new HttpServerMock(); |
| 3318 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
| 3319 var arg_request = buildSetNodePoolSizeRequest(); |
| 3320 var arg_projectId = "foo"; |
| 3321 var arg_zone = "foo"; |
| 3322 var arg_clusterId = "foo"; |
| 3323 var arg_nodePoolId = "foo"; |
| 3324 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3325 var obj = new api.SetNodePoolSizeRequest.fromJson(json); |
| 3326 checkSetNodePoolSizeRequest(obj); |
| 3327 |
| 3328 var path = (req.url).path; |
| 3329 var pathOffset = 0; |
| 3330 var index; |
| 3331 var subPart; |
| 3332 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3333 pathOffset += 1; |
| 3334 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 3335 pathOffset += 12; |
| 3336 index = path.indexOf("/zones/", pathOffset); |
| 3337 unittest.expect(index >= 0, unittest.isTrue); |
| 3338 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3339 pathOffset = index; |
| 3340 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 3341 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 3342 pathOffset += 7; |
| 3343 index = path.indexOf("/clusters/", pathOffset); |
| 3344 unittest.expect(index >= 0, unittest.isTrue); |
| 3345 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3346 pathOffset = index; |
| 3347 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 3348 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 3349 pathOffset += 10; |
| 3350 index = path.indexOf("/nodePools/", pathOffset); |
| 3351 unittest.expect(index >= 0, unittest.isTrue); |
| 3352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3353 pathOffset = index; |
| 3354 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 3355 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/nodePools/")); |
| 3356 pathOffset += 11; |
| 3357 index = path.indexOf("/setSize", pathOffset); |
| 3358 unittest.expect(index >= 0, unittest.isTrue); |
| 3359 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3360 pathOffset = index; |
| 3361 unittest.expect(subPart, unittest.equals("$arg_nodePoolId")); |
| 3362 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/setSize")); |
| 3363 pathOffset += 8; |
| 3364 |
| 3365 var query = (req.url).query; |
| 3366 var queryOffset = 0; |
| 3367 var queryMap = {}; |
| 3368 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3369 parseBool(n) { |
| 3370 if (n == "true") return true; |
| 3371 if (n == "false") return false; |
| 3372 if (n == null) return null; |
| 3373 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3374 } |
| 3375 if (query.length > 0) { |
| 3376 for (var part in query.split("&")) { |
| 3377 var keyvalue = part.split("="); |
| 3378 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3379 } |
| 3380 } |
| 3381 |
| 3382 |
| 3383 var h = { |
| 3384 "content-type" : "application/json; charset=utf-8", |
| 3385 }; |
| 3386 var resp = convert.JSON.encode(buildOperation()); |
| 3387 return new async.Future.value(stringResponse(200, h, resp)); |
| 3388 }), true); |
| 3389 res.setSize(arg_request, arg_projectId, arg_zone, arg_clusterId, arg_nodeP
oolId).then(unittest.expectAsync1(((api.Operation response) { |
| 3390 checkOperation(response); |
| 3391 }))); |
| 3392 }); |
| 3393 |
| 3394 unittest.test("method--update", () { |
| 3395 |
| 3396 var mock = new HttpServerMock(); |
| 3397 api.ProjectsZonesClustersNodePoolsResourceApi res = new api.ContainerApi(m
ock).projects.zones.clusters.nodePools; |
| 3398 var arg_request = buildUpdateNodePoolRequest(); |
| 3399 var arg_projectId = "foo"; |
| 3400 var arg_zone = "foo"; |
| 3401 var arg_clusterId = "foo"; |
| 3402 var arg_nodePoolId = "foo"; |
| 3403 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3404 var obj = new api.UpdateNodePoolRequest.fromJson(json); |
| 3405 checkUpdateNodePoolRequest(obj); |
| 3406 |
| 3407 var path = (req.url).path; |
| 3408 var pathOffset = 0; |
| 3409 var index; |
| 3410 var subPart; |
| 3411 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3412 pathOffset += 1; |
| 3413 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 3414 pathOffset += 12; |
| 3415 index = path.indexOf("/zones/", pathOffset); |
| 3416 unittest.expect(index >= 0, unittest.isTrue); |
| 3417 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3418 pathOffset = index; |
| 3419 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 3420 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
| 3421 pathOffset += 7; |
| 3422 index = path.indexOf("/clusters/", pathOffset); |
| 3423 unittest.expect(index >= 0, unittest.isTrue); |
| 3424 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3425 pathOffset = index; |
| 3426 unittest.expect(subPart, unittest.equals("$arg_zone")); |
| 3427 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); |
| 3428 pathOffset += 10; |
| 3429 index = path.indexOf("/nodePools/", pathOffset); |
| 3430 unittest.expect(index >= 0, unittest.isTrue); |
| 3431 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3432 pathOffset = index; |
| 3433 unittest.expect(subPart, unittest.equals("$arg_clusterId")); |
| 3434 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/nodePools/")); |
| 3435 pathOffset += 11; |
| 3436 index = path.indexOf("/update", pathOffset); |
| 3437 unittest.expect(index >= 0, unittest.isTrue); |
| 3438 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3439 pathOffset = index; |
| 3440 unittest.expect(subPart, unittest.equals("$arg_nodePoolId")); |
| 3441 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/update")); |
| 3442 pathOffset += 7; |
| 3443 |
| 3444 var query = (req.url).query; |
| 3445 var queryOffset = 0; |
| 3446 var queryMap = {}; |
| 3447 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3448 parseBool(n) { |
| 3449 if (n == "true") return true; |
| 3450 if (n == "false") return false; |
| 3451 if (n == null) return null; |
| 3452 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3453 } |
| 3454 if (query.length > 0) { |
| 3455 for (var part in query.split("&")) { |
| 3456 var keyvalue = part.split("="); |
| 3457 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3458 } |
| 3459 } |
| 3460 |
| 3461 |
| 3462 var h = { |
| 3463 "content-type" : "application/json; charset=utf-8", |
| 3464 }; |
| 3465 var resp = convert.JSON.encode(buildOperation()); |
| 3466 return new async.Future.value(stringResponse(200, h, resp)); |
| 3467 }), true); |
| 3468 res.update(arg_request, arg_projectId, arg_zone, arg_clusterId, arg_nodePo
olId).then(unittest.expectAsync1(((api.Operation response) { |
| 3469 checkOperation(response); |
| 3470 }))); |
| 3471 }); |
| 3472 |
2441 }); | 3473 }); |
2442 | 3474 |
2443 | 3475 |
2444 unittest.group("resource-ProjectsZonesOperationsResourceApi", () { | 3476 unittest.group("resource-ProjectsZonesOperationsResourceApi", () { |
2445 unittest.test("method--cancel", () { | 3477 unittest.test("method--cancel", () { |
2446 | 3478 |
2447 var mock = new HttpServerMock(); | 3479 var mock = new HttpServerMock(); |
2448 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; | 3480 api.ProjectsZonesOperationsResourceApi res = new api.ContainerApi(mock).pr
ojects.zones.operations; |
2449 var arg_request = buildCancelOperationRequest(); | 3481 var arg_request = buildCancelOperationRequest(); |
2450 var arg_projectId = "foo"; | 3482 var arg_projectId = "foo"; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2633 res.list(arg_projectId, arg_zone).then(unittest.expectAsync1(((api.ListOpe
rationsResponse response) { | 3665 res.list(arg_projectId, arg_zone).then(unittest.expectAsync1(((api.ListOpe
rationsResponse response) { |
2634 checkListOperationsResponse(response); | 3666 checkListOperationsResponse(response); |
2635 }))); | 3667 }))); |
2636 }); | 3668 }); |
2637 | 3669 |
2638 }); | 3670 }); |
2639 | 3671 |
2640 | 3672 |
2641 } | 3673 } |
2642 | 3674 |
OLD | NEW |