Search in sources :

Example 1 with OctaneSPEndpointSimulator

use of com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator in project octane-ci-java-sdk by MicroFocus.

the class SSCIntegrationTest method initSPEPSimulatorsForSSC.

private Map<String, OctaneSPEndpointSimulator> initSPEPSimulatorsForSSC(Set<String> spIDs, Map<String, List<String>> preflightRequestsCollectors, Map<String, List<String>> pushRequestCollectors) {
    Map<String, OctaneSPEndpointSimulator> result = new LinkedHashMap<>();
    for (String spID : spIDs) {
        OctaneSPEndpointSimulator simulator = OctaneSPEndpointSimulator.addInstance(spID);
        // vulnerabilities preflight API
        simulator.installApiHandler(HttpMethod.GET, "^.*/vulnerabilities/preflight$", request -> {
            try {
                // retrieve query parameters
                request.mergeQueryParameters("", request.getQueryString(), false);
                preflightRequestsCollectors.computeIfAbsent(spID, sid -> new LinkedList<>()).add(request.getQueryParameters().getString("instance-id") + "|" + request.getQueryParameters().getString("job-ci-id") + "|" + request.getQueryParameters().getString("build-ci-id"));
                request.getResponse().setStatus(HttpStatus.SC_OK);
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DateUtils.octaneFormat);
                request.getResponse().getWriter().write(getOctaneInput().baseline == null ? "true" : simpleDateFormat.format(getOctaneInput().baseline));
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new OctaneSDKGeneralException("failed to write response", ioe);
            }
        });
        // vulnerabilities push API
        simulator.installApiHandler(HttpMethod.POST, "^.*/vulnerabilities$", request -> {
            try {
                String rawVulnerabilitiesBody = CIPluginSDKUtils.inputStreamToUTF8String(new GZIPInputStream(request.getInputStream()));
                pushRequestCollectors.computeIfAbsent(spID, sid -> new LinkedList<>()).add(rawVulnerabilitiesBody);
                request.getResponse().setStatus(HttpStatus.SC_ACCEPTED);
                request.getResponse().getWriter().write("{\"status\": \"queued\"}");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new OctaneSDKGeneralException("failed to write response", ioe);
            }
        });
        // vulnerabilities push API
        simulator.installApiHandler(HttpMethod.GET, "^.*/vulnerabilities/remote-issue-ids.*", request -> {
            try {
                request.getResponse().setStatus(HttpStatus.SC_OK);
                request.getResponse().getWriter().write(SSCTestUtils.getJson(this.getOctaneInput().remoteIds));
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new OctaneSDKGeneralException("failed to write response", ioe);
            }
        });
        result.put(spID, simulator);
    }
    return result;
}
Also used : java.util(java.util) GZIPInputStream(java.util.zip.GZIPInputStream) OctaneSDKGeneralException(com.hp.octane.integrations.exceptions.OctaneSDKGeneralException) HttpStatus(org.apache.http.HttpStatus) SimpleDateFormat(java.text.SimpleDateFormat) IOException(java.io.IOException) GeneralTestUtils(com.hp.octane.integrations.testhelpers.GeneralTestUtils) CIPluginSDKUtils(com.hp.octane.integrations.utils.CIPluginSDKUtils) Collectors(java.util.stream.Collectors) SSCServerSimulator(com.hp.octane.integrations.testhelpers.SSCServerSimulator) HttpMethod(org.eclipse.jetty.http.HttpMethod) OctaneSDK(com.hp.octane.integrations.OctaneSDK) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) OctaneConfiguration(com.hp.octane.integrations.OctaneConfiguration) OctaneConfigurationIntern(com.hp.octane.integrations.OctaneConfigurationIntern) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator) Assert(org.junit.Assert) LogManager(org.apache.logging.log4j.LogManager) OctaneClient(com.hp.octane.integrations.OctaneClient) GZIPInputStream(java.util.zip.GZIPInputStream) OctaneSDKGeneralException(com.hp.octane.integrations.exceptions.OctaneSDKGeneralException) IOException(java.io.IOException) SimpleDateFormat(java.text.SimpleDateFormat) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator)

Example 2 with OctaneSPEndpointSimulator

use of com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator in project octane-ci-java-sdk by MicroFocus.

the class VulnerabilitiesServiceFunctionalityTest method testVulnerabilitiesFunctional.

@Test(timeout = 20000)
public void testVulnerabilitiesFunctional() {
    Map<String, OctaneSPEndpointSimulator> simulators = null;
    try {
        String spIdA = UUID.randomUUID().toString();
        String spIdB = UUID.randomUUID().toString();
        String clientAInstanceId = UUID.randomUUID().toString();
        String clientBInstanceId = UUID.randomUUID().toString();
        Map<String, List<String>> preflightRequestCollectors = new LinkedHashMap<>();
        Map<String, List<String>> pushVulnerabilitiesCollectors = new LinkedHashMap<>();
        // init 2 shared space endpoints simulators
        simulators = initSPEPSimulators(Stream.of(spIdA, spIdB).collect(Collectors.toSet()), preflightRequestCollectors, pushVulnerabilitiesCollectors);
        // 
        // I
        // add one client and verify it works okay
        // 
        OctaneConfiguration configA = new OctaneConfigurationIntern(clientAInstanceId, OctaneSPEndpointSimulator.getSimulatorUrl(), spIdA);
        OctaneClient clientA = OctaneSDK.addClient(configA, VulnerabilitiesServicePluginServicesTest.class);
        VulnerabilitiesService vulnerabilitiesServiceA = clientA.getVulnerabilitiesService();
        Assert.assertFalse(preflightRequestCollectors.containsKey(spIdA));
        Assert.assertFalse(preflightRequestCollectors.containsKey(spIdB));
        // 
        // II
        // add one more client and verify they are both works okay
        // 
        OctaneConfiguration configB = new OctaneConfigurationIntern(clientBInstanceId, OctaneSPEndpointSimulator.getSimulatorUrl(), spIdB);
        OctaneClient clientB = OctaneSDK.addClient(configB, VulnerabilitiesServicePluginServicesTest.class);
        VulnerabilitiesService vulnerabilitiesServiceB = clientB.getVulnerabilitiesService();
        vulnerabilitiesServiceA.enqueueRetrieveAndPushVulnerabilities("job-preflight-true", "1", ToolType.SSC, System.currentTimeMillis(), 1, null, null);
        vulnerabilitiesServiceA.enqueueRetrieveAndPushVulnerabilities("job-preflight-false", "1", ToolType.SSC, System.currentTimeMillis(), 1, null, null);
        vulnerabilitiesServiceB.enqueueRetrieveAndPushVulnerabilities("job-preflight-true", "1", ToolType.SSC, System.currentTimeMillis(), 1, null, null);
        vulnerabilitiesServiceB.enqueueRetrieveAndPushVulnerabilities("job-preflight-false", "1", ToolType.SSC, System.currentTimeMillis(), 1, null, null);
        GeneralTestUtils.waitAtMostFor(12000, () -> {
            if (preflightRequestCollectors.get(spIdA) != null && preflightRequestCollectors.get(spIdA).size() == 2 && preflightRequestCollectors.get(spIdB) != null && preflightRequestCollectors.get(spIdB).size() == 2) {
                return true;
            } else {
                return null;
            }
        });
        Assert.assertEquals(clientAInstanceId + "|job-preflight-true|1", preflightRequestCollectors.get(spIdA).get(0));
        Assert.assertEquals(clientAInstanceId + "|job-preflight-false|1", preflightRequestCollectors.get(spIdA).get(1));
        Assert.assertEquals(clientBInstanceId + "|job-preflight-true|1", preflightRequestCollectors.get(spIdB).get(0));
        Assert.assertEquals(clientBInstanceId + "|job-preflight-false|1", preflightRequestCollectors.get(spIdB).get(1));
        // 
        // III
        // remove one client and verify it is shut indeed and the second continue to work okay
        // 
        OctaneSDK.removeClient(clientA);
        // 
        // IV
        // remove second client and ensure no interactions anymore
        // 
        OctaneSDK.removeClient(clientB);
    } finally {
        // remove clients
        OctaneSDK.getClients().forEach(OctaneSDK::removeClient);
        // remove simulators
        if (simulators != null)
            removeSPEPSimulators(simulators.values());
        SSCServerSimulator.instance().endSimulation();
    }
}
Also used : OctaneClient(com.hp.octane.integrations.OctaneClient) OctaneConfiguration(com.hp.octane.integrations.OctaneConfiguration) LinkedList(java.util.LinkedList) List(java.util.List) OctaneSDK(com.hp.octane.integrations.OctaneSDK) OctaneConfigurationIntern(com.hp.octane.integrations.OctaneConfigurationIntern) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator) LinkedHashMap(java.util.LinkedHashMap) Test(org.junit.Test)

Example 3 with OctaneSPEndpointSimulator

use of com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator in project octane-ci-java-sdk by MicroFocus.

the class VulnerabilitiesServiceFunctionalityTest method initSPEPSimulatorsForSSC.

private Map<String, OctaneSPEndpointSimulator> initSPEPSimulatorsForSSC(Set<String> spIDs, Map<String, List<String>> preflightRequestsCollectors, Map<String, List<String>> pushRequestCollectors) {
    Map<String, OctaneSPEndpointSimulator> result = new LinkedHashMap<>();
    for (String spID : spIDs) {
        OctaneSPEndpointSimulator simulator = OctaneSPEndpointSimulator.addInstance(spID);
        // vulnerabilities preflight API
        simulator.installApiHandler(HttpMethod.GET, "^.*/vulnerabilities/preflight$", request -> {
            try {
                // retrieve query parameters
                request.mergeQueryParameters("", request.getQueryString(), false);
                preflightRequestsCollectors.computeIfAbsent(spID, sid -> new LinkedList<>()).add(request.getQueryParameters().getString("instance-id") + "|" + request.getQueryParameters().getString("job-ci-id") + "|" + request.getQueryParameters().getString("build-ci-id"));
                request.getResponse().setStatus(HttpStatus.SC_OK);
                request.getResponse().getWriter().write("true");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new OctaneSDKGeneralException("failed to write response", ioe);
            }
        });
        // vulnerabilities push API
        simulator.installApiHandler(HttpMethod.POST, "^.*/vulnerabilities$", request -> {
            try {
                String rawVulnerabilitiesBody = CIPluginSDKUtils.inputStreamToUTF8String(new GZIPInputStream(request.getInputStream()));
                pushRequestCollectors.computeIfAbsent(spID, sid -> new LinkedList<>()).add(rawVulnerabilitiesBody);
                request.getResponse().setStatus(HttpStatus.SC_ACCEPTED);
                request.getResponse().getWriter().write("{\"status\": \"queued\"}");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new OctaneSDKGeneralException("failed to write response", ioe);
            }
        });
        result.put(spID, simulator);
    }
    return result;
}
Also used : java.util(java.util) GZIPInputStream(java.util.zip.GZIPInputStream) HttpStatus(org.apache.http.HttpStatus) SimpleDateFormat(java.text.SimpleDateFormat) GeneralTestUtils(com.hp.octane.integrations.testhelpers.GeneralTestUtils) CIPluginSDKUtils(com.hp.octane.integrations.utils.CIPluginSDKUtils) SSCServerSimulator(com.hp.octane.integrations.testhelpers.SSCServerSimulator) LinkedHashMap(java.util.LinkedHashMap) OctaneSDK(com.hp.octane.integrations.OctaneSDK) Issues(com.hp.octane.integrations.services.vulnerabilities.ssc.dto.Issues) Map(java.util.Map) LinkedList(java.util.LinkedList) OctaneClient(com.hp.octane.integrations.OctaneClient) DateFormat(java.text.DateFormat) Collection(java.util.Collection) OctaneSDKGeneralException(com.hp.octane.integrations.exceptions.OctaneSDKGeneralException) Set(java.util.Set) Test(org.junit.Test) IOException(java.io.IOException) com.hp.octane.integrations.services.vulnerabilities.ssc(com.hp.octane.integrations.services.vulnerabilities.ssc) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) HttpMethod(org.eclipse.jetty.http.HttpMethod) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) OctaneConfiguration(com.hp.octane.integrations.OctaneConfiguration) OctaneConfigurationIntern(com.hp.octane.integrations.OctaneConfigurationIntern) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator) Assert(org.junit.Assert) LogManager(org.apache.logging.log4j.LogManager) GZIPInputStream(java.util.zip.GZIPInputStream) OctaneSDKGeneralException(com.hp.octane.integrations.exceptions.OctaneSDKGeneralException) IOException(java.io.IOException) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator) LinkedList(java.util.LinkedList) LinkedHashMap(java.util.LinkedHashMap)

Example 4 with OctaneSPEndpointSimulator

use of com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator in project octane-ci-java-sdk by MicroFocus.

the class VulnerabilitiesServiceFunctionalityTest method testVulnerabilitiesFunctionalSSC.

@Test(timeout = 20000)
public void testVulnerabilitiesFunctionalSSC() {
    Map<String, OctaneSPEndpointSimulator> simulators = null;
    try {
        String spIdA = UUID.randomUUID().toString();
        String clientAInstanceId = UUID.randomUUID().toString();
        Map<String, List<String>> preflightRequestCollectors = new LinkedHashMap<>();
        Map<String, List<String>> pushVulnerabilitiesCollectors = new LinkedHashMap<>();
        simulators = initSPEPSimulatorsForSSC(Stream.of(spIdA).collect(Collectors.toSet()), preflightRequestCollectors, pushVulnerabilitiesCollectors);
        // 
        // I
        // add one client and verify it works okay
        // 
        OctaneConfiguration configA = new OctaneConfigurationIntern(clientAInstanceId, OctaneSPEndpointSimulator.getSimulatorUrl(), spIdA);
        OctaneClient clientA = OctaneSDK.addClient(configA, VulnerabilitiesServicePluginServicesTest.class);
        VulnerabilitiesService vulnerabilitiesServiceA = clientA.getVulnerabilitiesService();
        prepareSSCSimulator();
        vulnerabilitiesServiceA.enqueueRetrieveAndPushVulnerabilities("jobSSC1", "1", ToolType.SSC, System.currentTimeMillis(), 1, null, null);
        GeneralTestUtils.waitAtMostFor(12000, () -> {
            if (preflightRequestCollectors.get(spIdA) != null && preflightRequestCollectors.get(spIdA).size() == 1) {
                return true;
            } else {
                return null;
            }
        });
        Assert.assertEquals(clientAInstanceId + "|jobSSC1|1", preflightRequestCollectors.get(spIdA).get(0));
        OctaneSDK.removeClient(clientA);
    } finally {
        // remove clients
        OctaneSDK.getClients().forEach(OctaneSDK::removeClient);
        // remove simulators
        if (simulators != null)
            removeSPEPSimulators(simulators.values());
        SSCServerSimulator.instance().endSimulation();
    }
}
Also used : OctaneClient(com.hp.octane.integrations.OctaneClient) OctaneConfiguration(com.hp.octane.integrations.OctaneConfiguration) LinkedList(java.util.LinkedList) List(java.util.List) OctaneSDK(com.hp.octane.integrations.OctaneSDK) OctaneConfigurationIntern(com.hp.octane.integrations.OctaneConfigurationIntern) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator) LinkedHashMap(java.util.LinkedHashMap) Test(org.junit.Test)

Example 5 with OctaneSPEndpointSimulator

use of com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator in project octane-ci-java-sdk by MicroFocus.

the class OctaneSDKBasicFunctionalityTest method initSPEPSimulators.

private Map<String, OctaneSPEndpointSimulator> initSPEPSimulators(Set<String> spIDs, Map<String, List<CIEventsList>> eventsCollectors, Map<String, List<TestsResult>> testResultsCollectors, Map<String, List<String>> logsCollectors, Map<String, List<String>> coverageCollectors) {
    Map<String, OctaneSPEndpointSimulator> result = new LinkedHashMap<>();
    for (String spID : spIDs) {
        OctaneSPEndpointSimulator simulator = OctaneSPEndpointSimulator.addInstance(spID);
        // for octane roots
        simulator.setOctaneVersion("15.1.8");
        // events API
        simulator.installApiHandler(HttpMethod.PUT, "^.*events$", request -> {
            try {
                String rawEventsBody = CIPluginSDKUtils.inputStreamToUTF8String(new GZIPInputStream(request.getInputStream()));
                CIEventsList eventsList = dtoFactory.dtoFromJson(rawEventsBody, CIEventsList.class);
                eventsCollectors.computeIfAbsent(spID, sp -> new LinkedList<>()).add(eventsList);
                request.getResponse().setStatus(HttpStatus.SC_OK);
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        // test results preflight API
        simulator.installApiHandler(HttpMethod.GET, "^.*tests-result-preflight$", request -> {
            try {
                request.getResponse().setStatus(HttpStatus.SC_OK);
                request.getResponse().getWriter().write("true");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        // test results push API
        simulator.installApiHandler(HttpMethod.POST, "^.*test-results$", request -> {
            try {
                String rawTestResultBody = CIPluginSDKUtils.inputStreamToUTF8String(new GZIPInputStream(request.getInputStream()));
                TestsResult testsResult = dtoFactory.dtoFromXml(rawTestResultBody, TestsResult.class);
                // [YG] below validations are done to ensure NEW API (via query params) aligned with an OLD API (data within XML)
                // [YG] in the future we'll remove OLD API and this validation should be done differently
                request.mergeQueryParameters("", request.getQueryString(), false);
                Assert.assertEquals(request.getQueryParameters().getString("instance-id"), testsResult.getBuildContext().getServerId());
                Assert.assertEquals(request.getQueryParameters().getString("job-ci-id"), testsResult.getBuildContext().getJobId());
                Assert.assertEquals(request.getQueryParameters().getString("build-ci-id"), testsResult.getBuildContext().getBuildId());
                testResultsCollectors.computeIfAbsent(spID, sp -> new LinkedList<>()).add(testsResult);
                request.getResponse().setStatus(HttpStatus.SC_ACCEPTED);
                request.getResponse().getWriter().write("{\"status\": \"queued\"}");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        // logs/coverage preflight API
        simulator.installApiHandler(HttpMethod.GET, "^.*workspaceId$", request -> {
            try {
                request.getResponse().setStatus(HttpStatus.SC_OK);
                request.getResponse().getWriter().write("[\"1001\"]");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        // logs push API
        simulator.installApiHandler(HttpMethod.POST, "^.*logs$", request -> {
            try {
                String rawLogBody = CIPluginSDKUtils.inputStreamToUTF8String(new GZIPInputStream(request.getInputStream()));
                logsCollectors.computeIfAbsent(spID, sp -> new LinkedList<>()).add(rawLogBody);
                request.getResponse().setStatus(HttpStatus.SC_OK);
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        // coverage preflight API
        // no need to configure, since it's the same API as for logs, see above
        // coverage push API
        simulator.installApiHandler(HttpMethod.PUT, "^.*coverage$", request -> {
            try {
                String rawCoverageBody = CIPluginSDKUtils.inputStreamToUTF8String(new GZIPInputStream(request.getInputStream()));
                coverageCollectors.computeIfAbsent(spID, sp -> new LinkedList<>()).add(rawCoverageBody);
                request.getResponse().setStatus(HttpStatus.SC_OK);
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        // get roots
        simulator.installApiHandler(HttpMethod.GET, "^.*pipeline-roots$", request -> {
            try {
                request.getResponse().setStatus(HttpStatus.SC_OK);
                request.getResponse().getWriter().write("[]");
                request.getResponse().getWriter().flush();
            } catch (IOException ioe) {
                throw new RuntimeException(ioe);
            }
        });
        result.put(spID, simulator);
    }
    return result;
}
Also used : GZIPInputStream(java.util.zip.GZIPInputStream) java.util(java.util) GZIPInputStream(java.util.zip.GZIPInputStream) ConfigurationService(com.hp.octane.integrations.services.configuration.ConfigurationService) CIEventsList(com.hp.octane.integrations.dto.events.CIEventsList) HttpStatus(org.apache.http.HttpStatus) GeneralTestUtils(com.hp.octane.integrations.testhelpers.GeneralTestUtils) CIPluginSDKUtils(com.hp.octane.integrations.utils.CIPluginSDKUtils) OctaneSDK(com.hp.octane.integrations.OctaneSDK) CoverageReportType(com.hp.octane.integrations.dto.coverage.CoverageReportType) DTOFactory(com.hp.octane.integrations.dto.DTOFactory) CIEventCauseType(com.hp.octane.integrations.dto.causes.CIEventCauseType) SCMData(com.hp.octane.integrations.dto.scm.SCMData) TestsResult(com.hp.octane.integrations.dto.tests.TestsResult) OctaneClient(com.hp.octane.integrations.OctaneClient) HttpServletResponse(javax.servlet.http.HttpServletResponse) SCMRepository(com.hp.octane.integrations.dto.scm.SCMRepository) Test(org.junit.Test) IOException(java.io.IOException) CIEvent(com.hp.octane.integrations.dto.events.CIEvent) Collectors(java.util.stream.Collectors) ExecutionException(java.util.concurrent.ExecutionException) SCMType(com.hp.octane.integrations.dto.scm.SCMType) HttpMethod(org.eclipse.jetty.http.HttpMethod) Logger(org.apache.logging.log4j.Logger) Stream(java.util.stream.Stream) OctaneConfiguration(com.hp.octane.integrations.OctaneConfiguration) CIEventCause(com.hp.octane.integrations.dto.causes.CIEventCause) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator) Assert(org.junit.Assert) ConfigurationParameterFactory(com.hp.octane.integrations.services.configurationparameters.factory.ConfigurationParameterFactory) LogManager(org.apache.logging.log4j.LogManager) CIEventType(com.hp.octane.integrations.dto.events.CIEventType) CIEventsList(com.hp.octane.integrations.dto.events.CIEventsList) TestsResult(com.hp.octane.integrations.dto.tests.TestsResult) IOException(java.io.IOException) OctaneSPEndpointSimulator(com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator)

Aggregations

OctaneSPEndpointSimulator (com.hp.octane.integrations.testhelpers.OctaneSPEndpointSimulator)10 OctaneConfiguration (com.hp.octane.integrations.OctaneConfiguration)8 OctaneClient (com.hp.octane.integrations.OctaneClient)7 OctaneSDK (com.hp.octane.integrations.OctaneSDK)7 Test (org.junit.Test)7 OctaneConfigurationIntern (com.hp.octane.integrations.OctaneConfigurationIntern)6 IOException (java.io.IOException)6 GZIPInputStream (java.util.zip.GZIPInputStream)6 GeneralTestUtils (com.hp.octane.integrations.testhelpers.GeneralTestUtils)5 CIPluginSDKUtils (com.hp.octane.integrations.utils.CIPluginSDKUtils)5 java.util (java.util)5 Collectors (java.util.stream.Collectors)5 Stream (java.util.stream.Stream)5 HttpStatus (org.apache.http.HttpStatus)5 LogManager (org.apache.logging.log4j.LogManager)5 Logger (org.apache.logging.log4j.Logger)5 HttpMethod (org.eclipse.jetty.http.HttpMethod)5 Assert (org.junit.Assert)5 LinkedHashMap (java.util.LinkedHashMap)4 LinkedList (java.util.LinkedList)4