use of com.mercedesbenz.sechub.test.TestURLBuilder in project sechub by mercedes-benz.
the class TestAPI method fetchMetaDataInspections.
public static List<Map<String, Object>> fetchMetaDataInspections() {
TestURLBuilder urlBuilder = IntegrationTestContext.get().getUrlBuilder();
String url = urlBuilder.buildFetchMetaDataInspectionsURL();
String json = IntegrationTestContext.get().getSuperAdminRestHelper().getJSON(url);
TestJSONHelper jsonHelper = TestJSONHelper.get();
List<Map<String, Object>> data;
try {
data = jsonHelper.getMapper().readValue(json, new TypeReference<List<Map<String, Object>>>() {
});
return data;
} catch (JsonProcessingException e) {
throw new AssertionError("Was not able to read meta data json", e);
}
}
use of com.mercedesbenz.sechub.test.TestURLBuilder in project sechub by mercedes-benz.
the class TestAPI method getIdForNameByNamePatternProvider.
public static String getIdForNameByNamePatternProvider(String namePatternProviderId, String name) {
TestURLBuilder urlBuilder = IntegrationTestContext.get().getUrlBuilder();
String url = urlBuilder.buildIntegrationTestGetIdForNameByNamePatternProvider(namePatternProviderId, name);
String result = IntegrationTestContext.get().getRestHelper(ANONYMOUS).getStringFromURL(url);
return result;
}
use of com.mercedesbenz.sechub.test.TestURLBuilder in project sechub by mercedes-benz.
the class TestAPI method getSecurityLogs.
public static List<SecurityLogData> getSecurityLogs() {
TestURLBuilder urlBuilder = IntegrationTestContext.get().getUrlBuilder();
String url = urlBuilder.buildIntegrationTestGetSecurityLogs();
String json = IntegrationTestContext.get().getRestHelper(ANONYMOUS).getJSON(url);
ObjectMapper mapper = TestJSONHelper.get().getMapper();
ObjectReader readerForListOf = mapper.readerForListOf(SecurityLogData.class);
try {
return readerForListOf.readValue(json);
} catch (Exception e) {
throw new IllegalStateException("was not able to fetch security logs", e);
}
}
use of com.mercedesbenz.sechub.test.TestURLBuilder in project sechub by mercedes-benz.
the class AsPDSUser method markJobAsReadyToStart.
public void markJobAsReadyToStart(UUID jobUUID) {
TestRestHelper restHelper = getRestHelper();
TestURLBuilder urlBuilder = getUrlBuilder();
markJobAsReadyToStart(jobUUID, restHelper, urlBuilder);
}
use of com.mercedesbenz.sechub.test.TestURLBuilder in project sechub by mercedes-benz.
the class AsPDSUser method createJobFor.
private String createJobFor(UUID sechubJobUUID, String productId, Map<String, String> params) {
TestRestHelper restHelper = getRestHelper();
TestURLBuilder urlBuilder = getUrlBuilder();
return createJobFor(sechubJobUUID, params, productId, restHelper, urlBuilder);
}
Aggregations