Skip to content
Snippets Groups Projects
Verified Commit b01b3d42 authored by Martin Weise's avatar Martin Weise
Browse files

Removed wrong tests about missing roles

parent ac15e2ca
No related branches found
No related tags found
2 merge requests!372WIP,!371Hotfix the wrong user id, ref #480
......@@ -91,21 +91,6 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest {
});
}
@Test
@WithMockUser(username = USER_4_USERNAME)
public void list_publicDataPrivateSchemaNoRole_fails() throws QueryNotFoundException, DatabaseNotFoundException,
RemoteUnavailableException, SQLException, MetadataServiceException {
/* mock */
when(subsetService.findAll(DATABASE_3_PRIVILEGED_DTO, null))
.thenReturn(List.of(QUERY_1_DTO, QUERY_2_DTO, QUERY_3_DTO, QUERY_4_DTO, QUERY_5_DTO, QUERY_6_DTO));
/* test */
assertThrows(NotAllowedException.class, () -> {
generic_list(DATABASE_3_ID, DATABASE_3_PRIVILEGED_DTO, USER_4_PRINCIPAL);
});
}
@Test
@WithMockUser(username = USER_3_USERNAME)
public void list_publicDataPrivateSchema_succeeds() throws DatabaseUnavailableException, NotAllowedException,
......@@ -131,21 +116,6 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest {
});
}
@Test
@WithMockUser(username = USER_4_USERNAME)
public void list_publicDataAndPrivateSchemaNoRole_fails() throws DatabaseNotFoundException,
RemoteUnavailableException, MetadataServiceException {
/* mock */
when(credentialService.getDatabase(DATABASE_3_ID))
.thenReturn(DATABASE_3_PRIVILEGED_DTO);
/* test */
assertThrows(NotAllowedException.class, () -> {
generic_list(DATABASE_3_ID, DATABASE_3_PRIVILEGED_DTO, USER_4_PRINCIPAL);
});
}
@Test
@WithMockUser(username = USER_3_USERNAME)
public void list_publicDataAndPrivateSchemaUnavailable_fails() throws SQLException, QueryNotFoundException,
......@@ -316,21 +286,6 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest {
});
}
@Test
@WithMockUser(username = USER_4_USERNAME)
public void findById_publicDataAndPrivateSchemaNoRole_fails() throws DatabaseNotFoundException,
RemoteUnavailableException, MetadataServiceException {
/* mock */
when(credentialService.getDatabase(DATABASE_3_ID))
.thenReturn(DATABASE_3_PRIVILEGED_DTO);
/* test */
assertThrows(NotAllowedException.class, () -> {
generic_findById(DATABASE_3_ID, QUERY_5_ID, "application/json", null, USER_4_PRINCIPAL);
});
}
@Test
@WithMockUser(username = USER_3_USERNAME)
public void findById_publicDataAndPrivateSchemaUnavailable_fails() throws DatabaseNotFoundException, RemoteUnavailableException,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment