blob: bc548675c4ab9eb8fb83fb0812fa45e6c439243f [file] [log] [blame]
Keith Byrnebda48592016-03-23 11:37:08 +00001// +build fixtures
2
Jamie Hannaford984e9172015-02-13 14:34:03 +01003package users
4
Jamie Hannaford984e9172015-02-13 14:34:03 +01005const singleDB = `{"databases": [{"name": "databaseE"}]}`
6
Jamie Hannaforde635b7d2015-02-18 14:11:46 +01007var changePwdReq = `
Jamie Hannaford984e9172015-02-13 14:34:03 +01008{
9 "users": [
10 {
11 "name": "dbuser1",
12 "password": "newpassword"
13 },
14 {
15 "name": "dbuser2",
16 "password": "anotherpassword"
17 }
18 ]
19}
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010020`
Jamie Hannaford984e9172015-02-13 14:34:03 +010021
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010022var updateReq = `
Jamie Hannaford984e9172015-02-13 14:34:03 +010023{
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010024 "user": {
25 "name": "new_username",
26 "password": "new_password"
27 }
Jamie Hannaford984e9172015-02-13 14:34:03 +010028}
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010029`
Jamie Hannaford984e9172015-02-13 14:34:03 +010030
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010031var getResp = `
Jamie Hannaford984e9172015-02-13 14:34:03 +010032{
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010033 "user": {
34 "name": "exampleuser",
35 "host": "foo",
36 "databases": [
37 {
38 "name": "databaseA"
39 },
40 {
41 "name": "databaseB"
42 }
43 ]
44 }
Jamie Hannaford984e9172015-02-13 14:34:03 +010045}
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010046`
Jamie Hannaford984e9172015-02-13 14:34:03 +010047
Jamie Hannaford1b2f8cb2015-10-16 12:25:07 +020048var listResp = `
49{
50"users": [
51 {
52 "name": "dbuser1",
53 "host": "localhost",
54 "databases": [
55 {
56 "name": "databaseA"
57 }
58 ]
59 },
60 {
61 "name": "dbuser2",
62 "host": "localhost",
63 "databases": [
64 {
65 "name": "databaseB"
66 },
67 {
68 "name": "databaseC"
69 }
70 ]
71 }
72]
73}
74`
75
Jamie Hannaforde635b7d2015-02-18 14:11:46 +010076var (
77 listUserAccessResp = singleDB
78 grantUserAccessReq = singleDB
79)