use of com.mercedesbenz.sechub.integrationtest.internal.IntegrationTestContext in project sechub by mercedes-benz.
the class IntegrationTestAction method checkIntegrationTestServerRunning.
private boolean checkIntegrationTestServerRunning() {
IntegrationTestContext integrationTestContext = IntegrationTestContext.get();
integrationTestContext.setHostname(getContext().getServer());
integrationTestContext.setPort(getContext().getPort());
String isAliveURL = integrationTestContext.getUrlBuilder().buildIntegrationTestIsAliveUrl();
if (!Boolean.TRUE.equals(IntegrationTestSetup.fetchTestServerStatus(isAliveURL))) {
warn("You are not running an integration test server, so cannot exeucte action!");
return false;
}
return true;
}
use of com.mercedesbenz.sechub.integrationtest.internal.IntegrationTestContext in project sechub by mercedes-benz.
the class DeveloperAdministration method updateTestAPIServerConnection.
/**
* Will update test API server connection data - makes it possible to use
* directly test API methods without writing duplicates for developer admin ui
* (faster development)
*
* @param server
* @param portNumber
*/
public void updateTestAPIServerConnection(String server, int portNumber) {
IntegrationTestContext integrationTestContext = IntegrationTestContext.get();
integrationTestContext.setHostname(server);
integrationTestContext.setPort(portNumber);
integrationTestContext.rebuild();
}
use of com.mercedesbenz.sechub.integrationtest.internal.IntegrationTestContext in project sechub by mercedes-benz.
the class EventInspectionAPI method fetchMap.
public static Map<String, String> fetchMap() {
IntegrationTestContext context = IntegrationTestContext.get();
String url = context.getUrlBuilder().buildIntegrationTestFetchEventInspectionStatus();
String json = context.getSuperAdminRestHelper().getJSON(url);
@SuppressWarnings("unchecked") Map<String, String> map = JSONConverter.get().fromJSON(Map.class, json);
return map;
}
use of com.mercedesbenz.sechub.integrationtest.internal.IntegrationTestContext in project sechub by mercedes-benz.
the class DeveloperAdministration method updateTestAPISuperAdmin.
public void updateTestAPISuperAdmin(String userId, String apiToken) {
IntegrationTestContext integrationTestContext = IntegrationTestContext.get();
integrationTestContext.setSuperAdminUser(new FixedTestUser(userId, apiToken));
integrationTestContext.rebuild();
}
use of com.mercedesbenz.sechub.integrationtest.internal.IntegrationTestContext in project sechub by mercedes-benz.
the class PDSServerEncryptionTest method beforeAll.
@BeforeAll
static void beforeAll() throws Exception {
IntegrationTestContext context = IntegrationTestContext.get();
String checkAlive = context.getPDSUrlBuilder().buildCheckIsAliveUrl();
securityTestHelper = new SecurityTestHelper(TestTargetType.PDS_SERVER, new URL(checkAlive));
}
Aggregations