Skip to content

Commit

Permalink
Fix random pagination failures in ManageGroupsFeatureIT by using the …
Browse files Browse the repository at this point in the history
…"feature" param to filter for the feature we are looking for. If this feature appeared on page 2, then the tests would fail.
  • Loading branch information
tdonohue committed Jul 10, 2024
1 parent 3b5adf2 commit 5cf5b49
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void testSubGroupOfAdminGroup() throws Exception {

// Verify an ePerson in a subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -285,7 +285,7 @@ public void testSubSubGroupOfAdminGroup() throws Exception {

// Verify an ePerson in a sub-subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -502,7 +502,7 @@ public void testSubGroupOfAdminGroupNoCommunityGroupPermission() throws Exceptio

// Verify an ePerson in a subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -636,7 +636,7 @@ public void testSubSubGroupOfAdminGroupNoCommunityGroupPermission() throws Excep

// Verify an ePerson in a sub-subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -897,7 +897,7 @@ public void testSubGroupOfAdminGroupNoCollectionGroupPermission() throws Excepti

// Verify an ePerson in a subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -1051,7 +1051,7 @@ public void testSubSubGroupOfAdminGroupNoCollectionGroupPermission() throws Exce

// Verify an ePerson in a sub-subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -1352,7 +1352,7 @@ public void testSubGroupOfAdminGroupNoComColGroupPermission() throws Exception {

// Verify an ePerson in a subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down Expand Up @@ -1526,7 +1526,7 @@ public void testSubSubGroupOfAdminGroupNoComColGroupPermission() throws Exceptio

// Verify an ePerson in a sub-subgroup of the site administrators has this feature
getClient(token).perform(get("/api/authz/authorizations/search/object?embed=feature&uri="
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID()))
+ "http://localhost/api/core/sites/" + siteService.findSite(context).getID() + "&feature=canManageGroups"))
.andExpect(status().isOk())
.andExpect(
jsonPath("$._embedded.authorizations[?(@._embedded.feature.id=='canManageGroups')]")
Expand Down

0 comments on commit 5cf5b49

Please sign in to comment.