blob: 3738d4bb9bcc00568d7654c23f1cced550da3db5 [file] [log] [blame]
Jamie Hannaford89f9af22014-09-17 12:21:48 +02001package subnets
2
Jamie Hannaford0708c002014-09-17 16:08:49 +02003import (
4 "fmt"
5 "net/http"
6 "testing"
7
Jon Perritt27249f42016-02-18 10:35:59 -06008 fake "github.com/gophercloud/gophercloud/openstack/networking/v2/common"
9 "github.com/gophercloud/gophercloud/pagination"
10 th "github.com/gophercloud/gophercloud/testhelper"
Jamie Hannaford0708c002014-09-17 16:08:49 +020011)
12
Jamie Hannaford89f9af22014-09-17 12:21:48 +020013func TestList(t *testing.T) {
Jamie Hannaford0708c002014-09-17 16:08:49 +020014 th.SetupHTTP()
15 defer th.TeardownHTTP()
Jamie Hannaford89f9af22014-09-17 12:21:48 +020016
Jamie Hannaforda2976ab2014-10-09 10:32:58 +020017 th.Mux.HandleFunc("/v2.0/subnets", func(w http.ResponseWriter, r *http.Request) {
Jamie Hannaford0708c002014-09-17 16:08:49 +020018 th.TestMethod(t, r, "GET")
Jamie Hannaford58b008f2014-10-06 10:07:47 +020019 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
Jamie Hannaford0708c002014-09-17 16:08:49 +020020
21 w.Header().Add("Content-Type", "application/json")
22 w.WriteHeader(http.StatusOK)
23
24 fmt.Fprintf(w, `
25{
26 "subnets": [
27 {
28 "name": "private-subnet",
29 "enable_dhcp": true,
30 "network_id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
31 "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
32 "dns_nameservers": [],
33 "allocation_pools": [
34 {
35 "start": "10.0.0.2",
36 "end": "10.0.0.254"
37 }
38 ],
39 "host_routes": [],
40 "ip_version": 4,
41 "gateway_ip": "10.0.0.1",
42 "cidr": "10.0.0.0/24",
43 "id": "08eae331-0402-425a-923c-34f7cfe39c1b"
44 },
45 {
46 "name": "my_subnet",
47 "enable_dhcp": true,
48 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
49 "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
50 "dns_nameservers": [],
51 "allocation_pools": [
52 {
53 "start": "192.0.0.2",
54 "end": "192.255.255.254"
55 }
56 ],
57 "host_routes": [],
58 "ip_version": 4,
59 "gateway_ip": "192.0.0.1",
60 "cidr": "192.0.0.0/8",
61 "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
Joe Topjianf92ae6c2016-04-06 21:24:43 -060062 },
63 {
64 "name": "my_gatewayless_subnet",
65 "enable_dhcp": true,
66 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23",
67 "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
68 "dns_nameservers": [],
69 "allocation_pools": [
70 {
71 "start": "192.168.1.2",
72 "end": "192.168.1.254"
73 }
74 ],
75 "host_routes": [],
76 "ip_version": 4,
77 "gateway_ip": null,
78 "cidr": "192.168.1.0/24",
79 "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0c"
Jamie Hannaford0708c002014-09-17 16:08:49 +020080 }
81 ]
82}
83 `)
84 })
85
86 count := 0
87
Jamie Hannaford58b008f2014-10-06 10:07:47 +020088 List(fake.ServiceClient(), ListOpts{}).EachPage(func(page pagination.Page) (bool, error) {
Jamie Hannaford0708c002014-09-17 16:08:49 +020089 count++
90 actual, err := ExtractSubnets(page)
91 if err != nil {
92 t.Errorf("Failed to extract subnets: %v", err)
93 return false, nil
94 }
95
96 expected := []Subnet{
97 Subnet{
98 Name: "private-subnet",
99 EnableDHCP: true,
100 NetworkID: "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
101 TenantID: "26a7980765d0414dbc1fc1f88cdb7e6e",
Jamie Hannaford965ae702014-09-22 14:58:19 +0200102 DNSNameservers: []string{},
Jamie Hannaford0708c002014-09-17 16:08:49 +0200103 AllocationPools: []AllocationPool{
104 AllocationPool{
105 Start: "10.0.0.2",
106 End: "10.0.0.254",
107 },
108 },
Jamie Hannafordf2835402014-09-23 11:01:21 +0200109 HostRoutes: []HostRoute{},
Jamie Hannaford0708c002014-09-17 16:08:49 +0200110 IPVersion: 4,
111 GatewayIP: "10.0.0.1",
112 CIDR: "10.0.0.0/24",
113 ID: "08eae331-0402-425a-923c-34f7cfe39c1b",
114 },
115 Subnet{
116 Name: "my_subnet",
117 EnableDHCP: true,
118 NetworkID: "d32019d3-bc6e-4319-9c1d-6722fc136a22",
119 TenantID: "4fd44f30292945e481c7b8a0c8908869",
Jamie Hannaford965ae702014-09-22 14:58:19 +0200120 DNSNameservers: []string{},
Jamie Hannaford0708c002014-09-17 16:08:49 +0200121 AllocationPools: []AllocationPool{
122 AllocationPool{
123 Start: "192.0.0.2",
124 End: "192.255.255.254",
125 },
126 },
Jamie Hannafordf2835402014-09-23 11:01:21 +0200127 HostRoutes: []HostRoute{},
Jamie Hannaford0708c002014-09-17 16:08:49 +0200128 IPVersion: 4,
129 GatewayIP: "192.0.0.1",
130 CIDR: "192.0.0.0/8",
131 ID: "54d6f61d-db07-451c-9ab3-b9609b6b6f0b",
132 },
Joe Topjianf92ae6c2016-04-06 21:24:43 -0600133 Subnet{
134 Name: "my_gatewayless_subnet",
135 EnableDHCP: true,
136 NetworkID: "d32019d3-bc6e-4319-9c1d-6722fc136a23",
137 TenantID: "4fd44f30292945e481c7b8a0c8908869",
138 DNSNameservers: []string{},
139 AllocationPools: []AllocationPool{
140 AllocationPool{
141 Start: "192.168.1.2",
142 End: "192.168.1.254",
143 },
144 },
145 HostRoutes: []HostRoute{},
146 IPVersion: 4,
147 GatewayIP: "",
148 CIDR: "192.168.1.0/24",
149 ID: "54d6f61d-db07-451c-9ab3-b9609b6b6f0c",
150 },
Jamie Hannaford0708c002014-09-17 16:08:49 +0200151 }
152
153 th.CheckDeepEquals(t, expected, actual)
154
155 return true, nil
156 })
157
158 if count != 1 {
159 t.Errorf("Expected 1 page, got %d", count)
160 }
161}
162
163func TestGet(t *testing.T) {
164 th.SetupHTTP()
165 defer th.TeardownHTTP()
166
Jamie Hannaforda2976ab2014-10-09 10:32:58 +0200167 th.Mux.HandleFunc("/v2.0/subnets/54d6f61d-db07-451c-9ab3-b9609b6b6f0b", func(w http.ResponseWriter, r *http.Request) {
Jamie Hannaford0708c002014-09-17 16:08:49 +0200168 th.TestMethod(t, r, "GET")
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200169 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
Jamie Hannaford0708c002014-09-17 16:08:49 +0200170
171 w.Header().Add("Content-Type", "application/json")
172 w.WriteHeader(http.StatusOK)
173
174 fmt.Fprintf(w, `
175{
176 "subnet": {
177 "name": "my_subnet",
178 "enable_dhcp": true,
179 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
180 "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
181 "dns_nameservers": [],
182 "allocation_pools": [
183 {
184 "start": "192.0.0.2",
185 "end": "192.255.255.254"
186 }
187 ],
188 "host_routes": [],
189 "ip_version": 4,
190 "gateway_ip": "192.0.0.1",
191 "cidr": "192.0.0.0/8",
192 "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
193 }
194}
195 `)
196 })
197
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200198 s, err := Get(fake.ServiceClient(), "54d6f61d-db07-451c-9ab3-b9609b6b6f0b").Extract()
Jamie Hannaford0708c002014-09-17 16:08:49 +0200199 th.AssertNoErr(t, err)
200
201 th.AssertEquals(t, s.Name, "my_subnet")
202 th.AssertEquals(t, s.EnableDHCP, true)
203 th.AssertEquals(t, s.NetworkID, "d32019d3-bc6e-4319-9c1d-6722fc136a22")
204 th.AssertEquals(t, s.TenantID, "4fd44f30292945e481c7b8a0c8908869")
Jamie Hannaford965ae702014-09-22 14:58:19 +0200205 th.AssertDeepEquals(t, s.DNSNameservers, []string{})
Jamie Hannaford0708c002014-09-17 16:08:49 +0200206 th.AssertDeepEquals(t, s.AllocationPools, []AllocationPool{
207 AllocationPool{
208 Start: "192.0.0.2",
209 End: "192.255.255.254",
210 },
211 })
Jamie Hannafordf2835402014-09-23 11:01:21 +0200212 th.AssertDeepEquals(t, s.HostRoutes, []HostRoute{})
Jamie Hannaford0708c002014-09-17 16:08:49 +0200213 th.AssertEquals(t, s.IPVersion, 4)
214 th.AssertEquals(t, s.GatewayIP, "192.0.0.1")
215 th.AssertEquals(t, s.CIDR, "192.0.0.0/8")
216 th.AssertEquals(t, s.ID, "54d6f61d-db07-451c-9ab3-b9609b6b6f0b")
Jamie Hannaford89f9af22014-09-17 12:21:48 +0200217}
Jamie Hannaford63631432014-09-18 11:40:09 +0200218
219func TestCreate(t *testing.T) {
220 th.SetupHTTP()
221 defer th.TeardownHTTP()
222
Jamie Hannaforda2976ab2014-10-09 10:32:58 +0200223 th.Mux.HandleFunc("/v2.0/subnets", func(w http.ResponseWriter, r *http.Request) {
Jamie Hannaford63631432014-09-18 11:40:09 +0200224 th.TestMethod(t, r, "POST")
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200225 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
Jamie Hannaford63631432014-09-18 11:40:09 +0200226 th.TestHeader(t, r, "Content-Type", "application/json")
227 th.TestHeader(t, r, "Accept", "application/json")
228 th.TestJSONRequest(t, r, `
229{
230 "subnet": {
231 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
232 "ip_version": 4,
Jamie Hannaford5d93f562014-10-09 10:53:32 +0200233 "cidr": "192.168.199.0/24",
234 "dns_nameservers": ["foo"],
235 "allocation_pools": [
236 {
237 "start": "192.168.199.2",
238 "end": "192.168.199.254"
239 }
240 ],
241 "host_routes": [{"destination":"","nexthop": "bar"}]
Jamie Hannaford63631432014-09-18 11:40:09 +0200242 }
243}
244 `)
245
246 w.Header().Add("Content-Type", "application/json")
247 w.WriteHeader(http.StatusCreated)
248
249 fmt.Fprintf(w, `
250{
251 "subnet": {
252 "name": "",
253 "enable_dhcp": true,
254 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
255 "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
256 "dns_nameservers": [],
257 "allocation_pools": [
258 {
259 "start": "192.168.199.2",
260 "end": "192.168.199.254"
261 }
262 ],
263 "host_routes": [],
264 "ip_version": 4,
265 "gateway_ip": "192.168.199.1",
266 "cidr": "192.168.199.0/24",
267 "id": "3b80198d-4f7b-4f77-9ef5-774d54e17126"
268 }
269}
270 `)
271 })
272
Jamie Hannaford5d93f562014-10-09 10:53:32 +0200273 opts := CreateOpts{
274 NetworkID: "d32019d3-bc6e-4319-9c1d-6722fc136a22",
275 IPVersion: 4,
276 CIDR: "192.168.199.0/24",
277 AllocationPools: []AllocationPool{
278 AllocationPool{
279 Start: "192.168.199.2",
280 End: "192.168.199.254",
281 },
282 },
283 DNSNameservers: []string{"foo"},
284 HostRoutes: []HostRoute{
285 HostRoute{NextHop: "bar"},
286 },
287 }
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200288 s, err := Create(fake.ServiceClient(), opts).Extract()
Jamie Hannaford63631432014-09-18 11:40:09 +0200289 th.AssertNoErr(t, err)
290
291 th.AssertEquals(t, s.Name, "")
292 th.AssertEquals(t, s.EnableDHCP, true)
293 th.AssertEquals(t, s.NetworkID, "d32019d3-bc6e-4319-9c1d-6722fc136a22")
294 th.AssertEquals(t, s.TenantID, "4fd44f30292945e481c7b8a0c8908869")
Jamie Hannaford965ae702014-09-22 14:58:19 +0200295 th.AssertDeepEquals(t, s.DNSNameservers, []string{})
Jamie Hannaford63631432014-09-18 11:40:09 +0200296 th.AssertDeepEquals(t, s.AllocationPools, []AllocationPool{
297 AllocationPool{
298 Start: "192.168.199.2",
299 End: "192.168.199.254",
300 },
301 })
Jamie Hannafordf2835402014-09-23 11:01:21 +0200302 th.AssertDeepEquals(t, s.HostRoutes, []HostRoute{})
Jamie Hannaford63631432014-09-18 11:40:09 +0200303 th.AssertEquals(t, s.IPVersion, 4)
304 th.AssertEquals(t, s.GatewayIP, "192.168.199.1")
305 th.AssertEquals(t, s.CIDR, "192.168.199.0/24")
306 th.AssertEquals(t, s.ID, "3b80198d-4f7b-4f77-9ef5-774d54e17126")
307}
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200308
Joe Topjianf92ae6c2016-04-06 21:24:43 -0600309func TestCreateNoGateway(t *testing.T) {
310 th.SetupHTTP()
311 defer th.TeardownHTTP()
312
313 th.Mux.HandleFunc("/v2.0/subnets", func(w http.ResponseWriter, r *http.Request) {
314 th.TestMethod(t, r, "POST")
315 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
316 th.TestHeader(t, r, "Content-Type", "application/json")
317 th.TestHeader(t, r, "Accept", "application/json")
318 th.TestJSONRequest(t, r, `
319{
320 "subnet": {
321 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23",
322 "ip_version": 4,
323 "cidr": "192.168.1.0/24",
324 "gateway_ip": null,
325 "allocation_pools": [
326 {
327 "start": "192.168.1.2",
328 "end": "192.168.1.254"
329 }
330 ]
331 }
332}
333 `)
334
335 w.Header().Add("Content-Type", "application/json")
336 w.WriteHeader(http.StatusCreated)
337
338 fmt.Fprintf(w, `
339{
340 "subnet": {
341 "name": "",
342 "enable_dhcp": true,
343 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23",
344 "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
345 "allocation_pools": [
346 {
347 "start": "192.168.1.2",
348 "end": "192.168.1.254"
349 }
350 ],
351 "host_routes": [],
352 "ip_version": 4,
353 "gateway_ip": null,
354 "cidr": "192.168.1.0/24",
355 "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0c"
356 }
357}
358 `)
359 })
360
361 opts := CreateOpts{
362 NetworkID: "d32019d3-bc6e-4319-9c1d-6722fc136a23",
363 IPVersion: 4,
364 CIDR: "192.168.1.0/24",
365 NoGateway: true,
366 AllocationPools: []AllocationPool{
367 AllocationPool{
368 Start: "192.168.1.2",
369 End: "192.168.1.254",
370 },
371 },
372 DNSNameservers: []string{},
373 }
374 s, err := Create(fake.ServiceClient(), opts).Extract()
375 th.AssertNoErr(t, err)
376
377 th.AssertEquals(t, s.Name, "")
378 th.AssertEquals(t, s.EnableDHCP, true)
379 th.AssertEquals(t, s.NetworkID, "d32019d3-bc6e-4319-9c1d-6722fc136a23")
380 th.AssertEquals(t, s.TenantID, "4fd44f30292945e481c7b8a0c8908869")
381 th.AssertDeepEquals(t, s.AllocationPools, []AllocationPool{
382 AllocationPool{
383 Start: "192.168.1.2",
384 End: "192.168.1.254",
385 },
386 })
387 th.AssertDeepEquals(t, s.HostRoutes, []HostRoute{})
388 th.AssertEquals(t, s.IPVersion, 4)
389 th.AssertEquals(t, s.GatewayIP, "")
390 th.AssertEquals(t, s.CIDR, "192.168.1.0/24")
391 th.AssertEquals(t, s.ID, "54d6f61d-db07-451c-9ab3-b9609b6b6f0c")
392}
393
Joe Topjian2524d112016-04-07 15:41:39 +0000394func TestCreateInvalidGatewayConfig(t *testing.T) {
395 th.SetupHTTP()
396 defer th.TeardownHTTP()
397
398 th.Mux.HandleFunc("/v2.0/subnets", func(w http.ResponseWriter, r *http.Request) {
399 th.TestMethod(t, r, "POST")
400 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
401 th.TestHeader(t, r, "Content-Type", "application/json")
402 th.TestHeader(t, r, "Accept", "application/json")
403 th.TestJSONRequest(t, r, `
404{
405 "subnet": {
406 "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23",
407 "ip_version": 4,
408 "cidr": "192.168.1.0/24",
409 "gateway_ip": "192.168.1.1",
410 "allocation_pools": [
411 {
412 "start": "192.168.1.2",
413 "end": "192.168.1.254"
414 }
415 ]
416 }
417}
418 `)
419
420 w.Header().Add("Content-Type", "application/json")
421 w.WriteHeader(http.StatusCreated)
422 })
423
424 opts := CreateOpts{
425 NetworkID: "d32019d3-bc6e-4319-9c1d-6722fc136a23",
426 IPVersion: 4,
427 CIDR: "192.168.1.0/24",
428 NoGateway: true,
429 GatewayIP: "192.168.1.1",
430 AllocationPools: []AllocationPool{
431 AllocationPool{
432 Start: "192.168.1.2",
433 End: "192.168.1.254",
434 },
435 },
436 DNSNameservers: []string{},
437 }
438 _, err := Create(fake.ServiceClient(), opts).Extract()
439 if err == nil {
440 t.Fatalf("Expected an error, got none")
441 }
442
443 if err != errInvalidGatewayConfig {
444 t.Fatalf("Exected errInvalidGateway but got: %s", err)
445 }
446}
447
Jamie Hannaford5d93f562014-10-09 10:53:32 +0200448func TestRequiredCreateOpts(t *testing.T) {
449 res := Create(fake.ServiceClient(), CreateOpts{})
450 if res.Err == nil {
451 t.Fatalf("Expected error, got none")
452 }
453
454 res = Create(fake.ServiceClient(), CreateOpts{NetworkID: "foo"})
455 if res.Err == nil {
456 t.Fatalf("Expected error, got none")
457 }
458
459 res = Create(fake.ServiceClient(), CreateOpts{NetworkID: "foo", CIDR: "bar", IPVersion: 40})
460 if res.Err == nil {
461 t.Fatalf("Expected error, got none")
462 }
463}
464
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200465func TestUpdate(t *testing.T) {
466 th.SetupHTTP()
467 defer th.TeardownHTTP()
468
Jamie Hannaforda2976ab2014-10-09 10:32:58 +0200469 th.Mux.HandleFunc("/v2.0/subnets/08eae331-0402-425a-923c-34f7cfe39c1b", func(w http.ResponseWriter, r *http.Request) {
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200470 th.TestMethod(t, r, "PUT")
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200471 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200472 th.TestHeader(t, r, "Content-Type", "application/json")
473 th.TestHeader(t, r, "Accept", "application/json")
474 th.TestJSONRequest(t, r, `
475{
476 "subnet": {
Jamie Hannaford5d93f562014-10-09 10:53:32 +0200477 "name": "my_new_subnet",
478 "dns_nameservers": ["foo"],
479 "host_routes": [{"destination":"","nexthop": "bar"}]
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200480 }
481}
482 `)
483
484 w.Header().Add("Content-Type", "application/json")
485 w.WriteHeader(http.StatusCreated)
486
487 fmt.Fprintf(w, `
488{
489 "subnet": {
490 "name": "my_new_subnet",
491 "enable_dhcp": true,
492 "network_id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
493 "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
494 "dns_nameservers": [],
495 "allocation_pools": [
496 {
497 "start": "10.0.0.2",
498 "end": "10.0.0.254"
499 }
500 ],
501 "host_routes": [],
502 "ip_version": 4,
503 "gateway_ip": "10.0.0.1",
504 "cidr": "10.0.0.0/24",
505 "id": "08eae331-0402-425a-923c-34f7cfe39c1b"
506 }
507}
508 `)
509 })
510
Jamie Hannaford5d93f562014-10-09 10:53:32 +0200511 opts := UpdateOpts{
512 Name: "my_new_subnet",
513 DNSNameservers: []string{"foo"},
514 HostRoutes: []HostRoute{
515 HostRoute{NextHop: "bar"},
516 },
517 }
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200518 s, err := Update(fake.ServiceClient(), "08eae331-0402-425a-923c-34f7cfe39c1b", opts).Extract()
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200519 th.AssertNoErr(t, err)
520
521 th.AssertEquals(t, s.Name, "my_new_subnet")
522 th.AssertEquals(t, s.ID, "08eae331-0402-425a-923c-34f7cfe39c1b")
523}
524
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200525func TestDelete(t *testing.T) {
526 th.SetupHTTP()
527 defer th.TeardownHTTP()
528
Jamie Hannaforda2976ab2014-10-09 10:32:58 +0200529 th.Mux.HandleFunc("/v2.0/subnets/08eae331-0402-425a-923c-34f7cfe39c1b", func(w http.ResponseWriter, r *http.Request) {
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200530 th.TestMethod(t, r, "DELETE")
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200531 th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200532 w.WriteHeader(http.StatusNoContent)
533 })
534
Jamie Hannaford58b008f2014-10-06 10:07:47 +0200535 res := Delete(fake.ServiceClient(), "08eae331-0402-425a-923c-34f7cfe39c1b")
Jamie Hannafordd9036422014-09-23 17:50:24 +0200536 th.AssertNoErr(t, res.Err)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +0200537}