partly fix unit tests
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -52,6 +52,7 @@ const (
|
|||||||
userIDKonnectd string = "820ba2a1-3f54-4538-80a4-2d73007e30bf"
|
userIDKonnectd string = "820ba2a1-3f54-4538-80a4-2d73007e30bf"
|
||||||
userIDReva string = "bc596f3c-c955-4328-80a0-60d018b4ad57"
|
userIDReva string = "bc596f3c-c955-4328-80a0-60d018b4ad57"
|
||||||
userIDMoss string = "058bff95-6708-4fe5-91e4-9ea3d377588b"
|
userIDMoss string = "058bff95-6708-4fe5-91e4-9ea3d377588b"
|
||||||
|
userIDAdmin string = "ddc2004c-0977-11eb-9d3f-a793888cd0f8"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -83,6 +84,7 @@ var DefaultUsers = []string{
|
|||||||
userIDReva,
|
userIDReva,
|
||||||
userIDMarie,
|
userIDMarie,
|
||||||
userIDMoss,
|
userIDMoss,
|
||||||
|
userIDAdmin,
|
||||||
}
|
}
|
||||||
|
|
||||||
var DefaultGroups = []string{
|
var DefaultGroups = []string{
|
||||||
@@ -457,6 +459,7 @@ func sendRequest(method, endpoint, body, auth string) (*httptest.ResponseRecorde
|
|||||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||||
|
|
||||||
if auth != "" {
|
if auth != "" {
|
||||||
|
// TODO this needs to use the x-access-token ...
|
||||||
req.Header.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(auth)))
|
req.Header.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(auth)))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1420,6 +1423,9 @@ func TestListUsersGroupDefaultUsers(t *testing.T) {
|
|||||||
userIDMoss: {
|
userIDMoss: {
|
||||||
groupUsers,
|
groupUsers,
|
||||||
},
|
},
|
||||||
|
userIDAdmin: {
|
||||||
|
groupUsers,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, ocsVersion := range ocsVersions {
|
for _, ocsVersion := range ocsVersions {
|
||||||
|
|||||||
Reference in New Issue
Block a user