blob: 6bbe65103da53f4279e5fbed860696ca6d5aee43 [file] [log] [blame]
Keith Byrnebda48592016-03-23 11:37:08 +00001// +build fixtures
2
Jamie Hannaford302c0b62015-02-16 14:12:34 +01003package backups
4
Jamie Hannaforde65ad952015-11-16 14:05:11 +01005import "time"
6
7var (
8 timestamp = "2015-11-12T14:22:42Z"
9 timeVal, _ = time.Parse(time.RFC3339, timestamp)
10)
11
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010012var getResp = `
Jamie Hannaforde0524732015-02-16 14:44:13 +010013{
14 "backup": {
Jamie Hannaforde65ad952015-11-16 14:05:11 +010015 "created": "` + timestamp + `",
Jamie Hannaforde0524732015-02-16 14:44:13 +010016 "description": "My Backup",
17 "id": "61f12fef-edb1-4561-8122-e7c00ef26a82",
18 "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
19 "locationRef": null,
20 "name": "snapshot",
21 "parent_id": null,
22 "size": 100,
23 "status": "NEW",
24 "datastore": {
25 "version": "5.1",
26 "type": "MySQL",
27 "version_id": "20000000-0000-0000-0000-000000000002"
28 },
Jamie Hannaforde65ad952015-11-16 14:05:11 +010029 "updated": "` + timestamp + `"
Jamie Hannaforde0524732015-02-16 14:44:13 +010030 }
31}
32`
33
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010034var createReq = `
Jamie Hannaford302c0b62015-02-16 14:12:34 +010035{
36 "backup": {
37 "description": "My Backup",
38 "instance": "d4603f69-ec7e-4e9b-803f-600b9205576f",
39 "name": "snapshot"
40 }
41}
42`
43
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010044var createResp = getResp
Jamie Hannaford302c0b62015-02-16 14:12:34 +010045
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010046var listResp = `
Jamie Hannaford302c0b62015-02-16 14:12:34 +010047{
48 "backups": [
49 {
50 "status": "COMPLETED",
Jamie Hannaforde65ad952015-11-16 14:05:11 +010051 "updated": "` + timestamp + `",
Jamie Hannaford302c0b62015-02-16 14:12:34 +010052 "description": "Backup from Restored Instance",
Jamie Hannaforde0524732015-02-16 14:44:13 +010053 "datastore": {
54 "version": "5.1",
55 "type": "MySQL",
56 "version_id": "20000000-0000-0000-0000-000000000002"
57 },
Jamie Hannaford302c0b62015-02-16 14:12:34 +010058 "id": "87972694-4be2-40f5-83f8-501656e0032a",
59 "size": 0.141026,
60 "name": "restored_backup",
Jamie Hannaforde65ad952015-11-16 14:05:11 +010061 "created": "` + timestamp + `",
Jamie Hannaford302c0b62015-02-16 14:12:34 +010062 "instance_id": "29af2cd9-0674-48ab-b87a-b160f00208e6",
63 "parent_id": null,
64 "locationRef": "http://localhost/path/to/backup"
65 }
66 ]
67}
68`