use of com.mercedesbenz.sechub.integrationtest.api.IntegrationTestJSONLocation in project sechub by mercedes-benz.
the class FalsePositivesScenario3IntTest method REST_API_direct_fetch_fp_config_when_one_entry_added.
@Test
public void REST_API_direct_fetch_fp_config_when_one_entry_added() throws Exception {
/* @formatter:off */
/**
********
*/
/* prepare */
/**
********
*/
IntegrationTestJSONLocation location = IntegrationTestJSONLocation.CLIENT_JSON_SOURCESCAN_YELLOW_ZERO_WAIT;
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(project, location);
assertReportUnordered(result).finding().id(1).name("Absolute Path Traversal").isContained().hasTrafficLight(TrafficLight.YELLOW);
UUID jobUUID = result.getSechubJobUUID();
as(USER_1).startFalsePositiveDefinition(project).add(1, jobUUID).markAsFalsePositive();
/**
********
*/
/* execute */
/**
********
*/
ProjectFalsePositivesDefinition configuration = as(USER_1).getFalsePositiveConfigurationOfProject(project);
/**
*****
*/
/* test */
/**
*****
*/
assertTrue(configuration.isContaining(1, jobUUID));
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.api.IntegrationTestJSONLocation 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