From 538e2df0266e40cce8ec544d4f9ac70cdd0ba52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 28 Oct 2020 15:55:54 +0100 Subject: [PATCH] partly fix unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- ocs/pkg/server/http/svc_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ocs/pkg/server/http/svc_test.go b/ocs/pkg/server/http/svc_test.go index 5d826c53a2..42f0209a80 100644 --- a/ocs/pkg/server/http/svc_test.go +++ b/ocs/pkg/server/http/svc_test.go @@ -52,6 +52,7 @@ const ( userIDKonnectd string = "820ba2a1-3f54-4538-80a4-2d73007e30bf" userIDReva string = "bc596f3c-c955-4328-80a0-60d018b4ad57" userIDMoss string = "058bff95-6708-4fe5-91e4-9ea3d377588b" + userIDAdmin string = "ddc2004c-0977-11eb-9d3f-a793888cd0f8" ) const ( @@ -83,6 +84,7 @@ var DefaultUsers = []string{ userIDReva, userIDMarie, userIDMoss, + userIDAdmin, } 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") if auth != "" { + // TODO this needs to use the x-access-token ... req.Header.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(auth))) } @@ -1420,6 +1423,9 @@ func TestListUsersGroupDefaultUsers(t *testing.T) { userIDMoss: { groupUsers, }, + userIDAdmin: { + groupUsers, + }, } for _, ocsVersion := range ocsVersions {