azure: add support for nested groups (#1408)

* azure: add support for nested groups

* fix test
This commit is contained in:
Caleb Doxsey 2020-09-17 08:25:10 -06:00 committed by GitHub
parent 79a01bcfbb
commit 665f0f9a74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 151 additions and 17 deletions

View file

@ -54,11 +54,11 @@ func newMockAPI(t *testing.T, srv *httptest.Server) http.Handler {
r.Get("/groups/{group_name}/members", func(w http.ResponseWriter, r *http.Request) {
members := map[string][]M{
"admin": {
{"id": "user-1"},
{"@odata.type": "#microsoft.graph.user", "id": "user-1"},
},
"test": {
{"id": "user-2"},
{"id": "user-3"},
{"@odata.type": "#microsoft.graph.user", "id": "user-2"},
{"@odata.type": "#microsoft.graph.user", "id": "user-3"},
},
}
_ = json.NewEncoder(w).Encode(M{