Added test which can be useful for future fixes
This commit is contained in:
parent
eb27d67845
commit
7d822e07cb
|
@ -109,7 +109,7 @@ public class CKANGroupTest extends ContextTest {
|
|||
|
||||
// @Test
|
||||
public void createGRSFGroups() throws ObjectNotFound, Exception {
|
||||
// Setting GRSF ADMIN token of grsf.publisher user to read groups
|
||||
// Set grsf.publisher user
|
||||
ContextTest.setContext("");
|
||||
String key = CKANUtility.getSysAdminAPI();
|
||||
List<String> groupNames = listGroup();
|
||||
|
@ -131,4 +131,18 @@ public class CKANGroupTest extends ContextTest {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// @Test
|
||||
public void associateUserToAllCKANGroups() throws ObjectNotFound, Exception {
|
||||
// Set grsf.publisher user
|
||||
ContextTest.setContext("");
|
||||
String sysAdminAPI = CKANUtility.getSysAdminAPI();
|
||||
List<String> groupNames = listGroup();
|
||||
for(String groupName : groupNames) {
|
||||
CKANUser ckanUser = new CKANUser();
|
||||
ckanUser.setApiKey(sysAdminAPI);
|
||||
ckanUser.setName("grsf_publisher");
|
||||
ckanUser.addToGroup(CKANGroup.getCKANGroupName(groupName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue