Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 1 | package users |
| 2 | |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 3 | const singleDB = `{"databases": [{"name": "databaseE"}]}` |
| 4 | |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 5 | var changePwdReq = ` |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 6 | { |
| 7 | "users": [ |
| 8 | { |
| 9 | "name": "dbuser1", |
| 10 | "password": "newpassword" |
| 11 | }, |
| 12 | { |
| 13 | "name": "dbuser2", |
| 14 | "password": "anotherpassword" |
| 15 | } |
| 16 | ] |
| 17 | } |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 18 | ` |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 19 | |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 20 | var updateReq = ` |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 21 | { |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 22 | "user": { |
| 23 | "name": "new_username", |
| 24 | "password": "new_password" |
| 25 | } |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 26 | } |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 27 | ` |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 28 | |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 29 | var getResp = ` |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 30 | { |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 31 | "user": { |
| 32 | "name": "exampleuser", |
| 33 | "host": "foo", |
| 34 | "databases": [ |
| 35 | { |
| 36 | "name": "databaseA" |
| 37 | }, |
| 38 | { |
| 39 | "name": "databaseB" |
| 40 | } |
| 41 | ] |
| 42 | } |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 43 | } |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 44 | ` |
Jamie Hannaford | 984e917 | 2015-02-13 14:34:03 +0100 | [diff] [blame] | 45 | |
Jamie Hannaford | 1b2f8cb | 2015-10-16 12:25:07 +0200 | [diff] [blame^] | 46 | var listResp = ` |
| 47 | { |
| 48 | "users": [ |
| 49 | { |
| 50 | "name": "dbuser1", |
| 51 | "host": "localhost", |
| 52 | "databases": [ |
| 53 | { |
| 54 | "name": "databaseA" |
| 55 | } |
| 56 | ] |
| 57 | }, |
| 58 | { |
| 59 | "name": "dbuser2", |
| 60 | "host": "localhost", |
| 61 | "databases": [ |
| 62 | { |
| 63 | "name": "databaseB" |
| 64 | }, |
| 65 | { |
| 66 | "name": "databaseC" |
| 67 | } |
| 68 | ] |
| 69 | } |
| 70 | ] |
| 71 | } |
| 72 | ` |
| 73 | |
Jamie Hannaford | e635b7d | 2015-02-18 14:11:46 +0100 | [diff] [blame] | 74 | var ( |
| 75 | listUserAccessResp = singleDB |
| 76 | grantUserAccessReq = singleDB |
| 77 | ) |