use of com.mercedesbenz.sechub.integrationtest.internal.SecHubClientExecutor.ExecutionResult in project sechub by mercedes-benz.
the class SecHubExecutionScenarioSecHubClientIntTest method sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_green_when_config_is_extreme_big.
@Test
public void sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_green_when_config_is_extreme_big() {
/* prepare */
as(SUPER_ADMIN).assignUserToProject(USER_1, PROJECT_1);
/* @formatter:off */
assertUser(USER_1).doesExist().isAssignedToProject(PROJECT_1);
/* execute */
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(PROJECT_1, CLIENT_JSON_SOURCESCAN_GREEN_EXTREME_BIG);
/* test */
assertResult(result).isGreen().hasExitCode(0);
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.internal.SecHubClientExecutor.ExecutionResult in project sechub by mercedes-benz.
the class SecHubExecutionScenarioSecHubClientIntTest method sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_green.
@Test
public void sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_green() {
/* prepare */
as(SUPER_ADMIN).assignUserToProject(USER_1, PROJECT_1);
/* @formatter:off */
assertUser(USER_1).doesExist().isAssignedToProject(PROJECT_1);
/* execute */
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(PROJECT_1, CLIENT_JSON_SOURCESCAN_GREEN_ZERO_WAIT_BIG_CONFIGFILE);
/* test */
assertResult(result).isGreen().hasExitCode(0);
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.internal.SecHubClientExecutor.ExecutionResult in project sechub by mercedes-benz.
the class SecHubExecutionScenarioSecHubClientIntTest method sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_red.
@Test
public void sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_red() {
/* @formatter:off */
/* prepare */
as(SUPER_ADMIN).assignUserToProject(USER_1, PROJECT_1);
assertUser(USER_1).doesExist().isAssignedToProject(PROJECT_1);
/* execute */
ExecutionResult result = as(USER_1).withSecHubClient().startSynchronScanFor(PROJECT_1, CLIENT_JSON_WEBSCAN_RED_ZERO_WAIT);
/* test */
assertResult(result).isRed().hasExitCode(1);
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.internal.SecHubClientExecutor.ExecutionResult in project sechub by mercedes-benz.
the class SecHubExecutionScenarioSecHubClientIntTest method sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_yellow_stop_on_yellow_active_so_exit_code1.
@Test
public void sechub_client_is_able_to_handle_synchronous_and_result_has_trafficlight_yellow_stop_on_yellow_active_so_exit_code1() {
/* prepare */
as(SUPER_ADMIN).assignUserToProject(USER_1, PROJECT_1);
/* @formatter:off */
assertUser(USER_1).doesExist().isAssignedToProject(PROJECT_1);
/* execute */
ExecutionResult result = as(USER_1).withSecHubClient().enableStopOnYellow().startSynchronScanFor(PROJECT_1, CLIENT_JSON_SOURCESCAN_YELLOW_ZERO_WAIT);
/* test */
assertResult(result).isYellow().hasExitCode(1);
/* @formatter:on */
}
use of com.mercedesbenz.sechub.integrationtest.internal.SecHubClientExecutor.ExecutionResult in project sechub by mercedes-benz.
the class WithSecHubClient method getFalsePositiveConfigurationOfProject.
public ProjectFalsePositivesDefinition getFalsePositiveConfigurationOfProject(TestProject project, IntegrationTestJSONLocation location) {
File sechubConfigFile = IntegrationTestFileSupport.getTestfileSupport().createFileFromResourcePath(location.getPath());
SecHubClientExecutor executor = createExecutor();
List<String> list = buildEnvironmentAndBehaviourCommands(project);
ExecutionResult result = doExecute(ClientAction.GET_FALSE_POSITIVES, sechubConfigFile, executor, list, null);
if (result.getExitCode() != 0) {
fail("Not exit code 0 but:" + result.getExitCode() + " , last output line was:" + result.getLastOutputLine());
}
File file = result.getJSONFalsePositiveFile();
String json = TestFileSupport.loadTextFile(file, "\n");
return asUser.create(project, json);
}
Aggregations