@AfterClass public static void cleanupSuite() throws Exception { LOG_ENTER(); gateway.stop(); ldap.stop(true); // FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) ); // NoOpAppender.tearDown( appenders ); LOG_EXIT(); }
@BeforeClass public static void setupSuite() throws Exception { LOG_ENTER(); RestAssured.config = newConfig().connectionConfig(connectionConfig().closeIdleConnectionsAfterEachResponse()); // appenders = NoOpAppender.setUp(); setupLdap(); setupGateway(); LOG_EXIT(); }
@Test(timeout = MEDIUM_TIMEOUT) public void testTestService() throws ClassNotFoundException { LOG_ENTER(); String username = "******"; String password = "******"; String serviceUrl = clusterUrl + "/test-service-path/test-service-resource"; given() // .log().all() .auth() .preemptive() .basic(username, password) .expect() // .log().all() .statusCode(HttpStatus.SC_OK) .contentType("text/plain") .body(is("test-service-response")) .when() .get(serviceUrl); LOG_EXIT(); }