protected BrooklynRestApiLauncher baseLauncher() { return BrooklynRestApiLauncher.launcher() .securityProvider(AnyoneSecurityProvider.class); }
/** due to the relative path search in {@link BrooklynRestApiLauncher} we can just call that method */ public static Server startJavascriptAndRest() throws Exception { return BrooklynRestApiLauncher.launcherServlet() .securityProvider(AnyoneSecurityProvider.class) .start(); }
@BeforeClass public void setUp() throws Exception { server = BrooklynRestApiLauncher.launcher() .managementContext(manager) .securityProvider(TestSecurityProvider.class) .start(); api = BrooklynApi.newInstance("http://localhost:" + ((NetworkConnector)server.getConnectors()[0]).getPort() + "/v1", TestSecurityProvider.USER, TestSecurityProvider.PASSWORD); }
@Test(groups = "Integration") public void testGetUser() throws Exception { Server server = useServerForTest(baseLauncher() .securityProvider(TestSecurityProvider.class) .withoutJsgui() .start()); assertEquals(getServerUser(server), TestSecurityProvider.USER); }
private void initHaCluster(HighAvailabilityMode writeMode, HighAvailabilityMode readMode) throws InterruptedException, TimeoutException { mementoDir = Os.newTempDir(getClass()); writeMgmt = createManagementContext(mementoDir, writeMode); appId = createApp(writeMgmt); writeMgmt.getRebindManager().waitForPendingComplete(TIMEOUT, true); if (readMode == HighAvailabilityMode.DISABLED) { //no HA, one node only readMgmt = writeMgmt; } else { readMgmt = createManagementContext(mementoDir, readMode); } server = useServerForTest(baseLauncher() .securityProvider(AnyoneSecurityProvider.class) .managementContext(readMgmt) .forceUseOfDefaultCatalogWithJavaClassPath(true) .withoutJsgui() .disableHighAvailability(false) .start()); client = getClient(server); }
.managementContext(mgmt) .withoutJsgui() .securityProvider(TestSecurityProvider.class) .start()); String baseUri = getBaseUriRest(server);