use of com.mercedesbenz.sechub.integrationtest.internal.SecHubClientExecutor.ExecutionResult in project sechub by mercedes-benz.
the class ProjectChangeAccessLevelScenario3IntTest method a_delete_removes_former_access_level_settings.
/* @formatter:off */
@Test
public void a_delete_removes_former_access_level_settings() throws Exception {
/* prepare + test preconditions */
TestProject project = PROJECT_1;
as(SUPER_ADMIN).changeProjectAccessLevel(project, ProjectAccessLevel.NONE);
assertProject(project).hasAccessLevel(ProjectAccessLevel.NONE);
/* execute */
as(SUPER_ADMIN).deleteProject(project);
/* test*/
waitProjectDoesNotExist(project);
// now we create a new project with same name etc.
as(SUPER_ADMIN).createProject(project, USER_1.getUserId()).addProjectsToProfile(ExecutionConstants.DEFAULT_EXECUTION_PROFILE_ID, project).assignUserToProject(USER_1, project);
// now we test that the acces level is full... and not NONE as before the delete...
assertProject(project).hasAccessLevel(ProjectAccessLevel.FULL);
// we start a job by USER1 and download the results- at this moment, this is possible, because project access level of new project is "FULL"
IntegrationTestJSONLocation location = IntegrationTestJSONLocation.CLIENT_JSON_SOURCESCAN_YELLOW;
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(project, location);
assertSecHubReport(result).hasTrafficLight(TrafficLight.YELLOW);
}
Aggregations