|
1 | | -//go:build (!oss && integration) || upgrade |
2 | | -// +build !oss,integration upgrade |
| 1 | +//go:build integration || upgrade |
| 2 | +// +build integration upgrade |
3 | 3 |
|
4 | 4 | /* |
5 | 5 | * SPDX-FileCopyrightText: © Hypermode Inc. <[email protected]> |
@@ -462,34 +462,6 @@ const ( |
462 | 462 | }` |
463 | 463 | ) |
464 | 464 |
|
465 | | -func checkUserCount(t *testing.T, resp []byte, expected int) { |
466 | | - type Response struct { |
467 | | - AddUser struct { |
468 | | - User []struct { |
469 | | - Name string |
470 | | - } |
471 | | - } |
472 | | - } |
473 | | - |
474 | | - var r Response |
475 | | - require.NoError(t, json.Unmarshal(resp, &r)) |
476 | | - require.Equal(t, expected, len(r.AddUser.User)) |
477 | | -} |
478 | | - |
479 | | -func checkGroupCount(t *testing.T, resp []byte, expected int) { |
480 | | - type Response struct { |
481 | | - AddGroup struct { |
482 | | - Group []struct { |
483 | | - Name string |
484 | | - } |
485 | | - } |
486 | | - } |
487 | | - |
488 | | - var r Response |
489 | | - require.NoError(t, json.Unmarshal(resp, &r)) |
490 | | - require.Equal(t, expected, len(r.AddGroup.Group)) |
491 | | -} |
492 | | - |
493 | 465 | func (asuite *AclTestSuite) TestGetCurrentUser() { |
494 | 466 | t := asuite.T() |
495 | 467 |
|
@@ -837,16 +809,6 @@ func createAccountAndData(t *testing.T, gc *dgraphapi.GrpcClient, hc *dgraphapi. |
837 | 809 | require.NoError(t, err) |
838 | 810 | } |
839 | 811 |
|
840 | | -type rule struct { |
841 | | - Predicate string `json:"predicate"` |
842 | | - Permission int32 `json:"permission"` |
843 | | -} |
844 | | - |
845 | | -type group struct { |
846 | | - Name string `json:"name"` |
847 | | - Rules []rule `json:"rules"` |
848 | | -} |
849 | | - |
850 | 812 | func createGroupAndAcls(t *testing.T, group string, addUserToGroup bool, hc *dgraphapi.HTTPClient) { |
851 | 813 | // create a new group |
852 | 814 | createdGroup, err := hc.CreateGroup(group) |
|
0 commit comments