Java Code Examples for org.wso2.carbon.automation.engine.context.TestUserMode#SUPER_TENANT_ADMIN
The following examples show how to use
org.wso2.carbon.automation.engine.context.TestUserMode#SUPER_TENANT_ADMIN .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpAccessLogTestCase.java From product-ei with Apache License 2.0 | 6 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(); serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); String nhttpFile = FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator + "ESB" + separator + "passthru" + separator + "transport" + separator + "httpaccesslogs" + separator + "access-log.properties"; File srcFile = new File(nhttpFile); String carbonHome = System.getProperty(ServerConstants.CARBON_HOME); httpLogDir = carbonHome + File.separator + "repository" + File.separator + "logs" + File.separator + "httpLogs"; File log4jProperties = new File(carbonHome + File.separator + "conf" + File.separator + "log4j2.properties"); String propertyName = "nhttp.log.directory"; createNewDir(httpLogDir); applyProperty(srcFile, propertyName, httpLogDir); applyProperty(log4jProperties, "logger.synapse-transport-http-access.level", "DEBUG"); serverConfigurationManager.restartGracefully(); super.init(); verifyProxyServiceExistence("HttpAccessLogsTestProxy"); }
Example 2
Source File: ESPublisherAddEditAssetTestCase.java From product-es with Apache License 2.0 | 6 votes |
@BeforeClass(alwaysRun = true) public void setUp() throws Exception { super.init(userMode); currentUserName = userInfo.getUserName().split("@")[0]; currentUserPwd = userInfo.getPassword(); driver = new ESWebDriver(BrowserManager.getWebDriver()); baseUrl = getWebAppURL(); AutomationContext automationContext = new AutomationContext(PRODUCT_GROUP_NAME, TestUserMode.SUPER_TENANT_ADMIN); adminUserName = automationContext.getSuperTenant().getTenantAdmin().getUserName(); adminUserPwd = automationContext.getSuperTenant().getTenantAdmin().getPassword(); normalUserName = automationContext.getSuperTenant().getTenantUser(USER1).getUserName().split("@")[0]; String normalUserPwd = automationContext.getSuperTenant().getTenantUser(USER1).getPassword(); resourcePath = GADGET_REGISTRY_BASE_PATH + normalUserName + "/" + ASSET_NAME + "/" + ASSET_VERSION_2; String backendURL = automationContext.getContextUrls().getBackEndUrl(); resourceAdminServiceClient = new ResourceAdminServiceClient(backendURL, adminUserName, adminUserPwd); ESUtil.login(driver, baseUrl, PUBLISHER_APP, currentUserName, currentUserPwd); }
Example 3
Source File: ESBJAVA4630RabbitMQMultipleListenerTestCase.java From product-ei with Apache License 2.0 | 6 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(); configurationManagerAxis2 = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator + "axis2config" + File.separator + "axis2.xml"); configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2); super.init(); rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance(); //This is to stop existing rabbitMQ server instances rabbitMQServer.stop(); rabbitMQServer.start(); Assert.assertTrue(rabbitMQServer.isRabbitMQStarted(90), "Failed to start rabbitMQ server properly within given timeout"); initRabbitMQBroker(); loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/multipleListner/RabbitMQMultipleListnerProxy.xml"); proxyServiceAdminClient = new ProxyServiceAdminClient(contextUrls.getBackEndUrl(), getSessionCookie()); }
Example 4
Source File: ApiStatisticsTest.java From product-ei with Apache License 2.0 | 6 votes |
@BeforeClass(alwaysRun = true) protected void initialize() throws Exception { //Starting the thrift port to listen to statistics events thriftServer = new ThriftServer("Wso2EventTestCase", 7612, true); thriftServer.start(7612); log.info("Thrift Server is Started on port 8462"); //Changing synapse configuration to enable statistics and tracing serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); serverConfigurationManager.applyConfiguration( new File(getESBResourceLocation() + File.separator + "StatisticTestResources" + File.separator + "synapse.properties")); super.init(); thriftServer.resetMsgCount(); thriftServer.resetPreservedEventList(); //load esb configuration to the server loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/statistics/synapseconfigapi.xml"); thriftServer.waitToReceiveEvents(20000, 3); //waiting for esb to send artifact config data to the thriftserver //Checking whether all the artifact configuration events are received Assert.assertEquals("Three configuration events are required", 3, thriftServer.getMsgCount()); }
Example 5
Source File: RDBMSEventTableTestCase.java From product-cep with Apache License 2.0 | 6 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(TestUserMode.SUPER_TENANT_ADMIN); String loggedInSessionCookie = getSessionCookie(); eventSimulatorAdminServiceClient = configurationUtil.getEventSimulatorAdminServiceClient(backendURL, loggedInSessionCookie); eventStreamManagerAdminServiceClient = configurationUtil.getEventStreamManagerAdminServiceClient(backendURL, loggedInSessionCookie); eventPublisherAdminServiceClient = configurationUtil.getEventPublisherAdminServiceClient(backendURL, loggedInSessionCookie); eventProcessorAdminServiceClient = configurationUtil.getEventProcessorAdminServiceClient(backendURL, loggedInSessionCookie); NDataSourceAdminServiceClient dataSourceAdminService = new NDataSourceAdminServiceClient(backendURL, loggedInSessionCookie); WSDataSourceMetaInfo dataSourceInfo = getDataSourceInformation("WSO2CEP_EVENT_TABLE_DB"); dataSourceAdminService.addDataSource(dataSourceInfo); }
Example 6
Source File: XMLToJsonTransformationPropertiesTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void initialize() throws Exception { super.init(); serverConfigurationManager = new ServerConfigurationManager( new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); serverConfigurationManager.applyMIConfigurationWithRestart(new File( getESBResourceLocation() + File.separator + "json" + File.separator + "jsonTransformationConfig" + File.separator + "deployment.toml")); super.init(); }
Example 7
Source File: MobileQSGTestCase.java From product-iots with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void initTest() throws Exception { super.init(TestUserMode.SUPER_TENANT_ADMIN); username1 = "alex"; username2 = "chris"; this.client = new RestClient(backendHTTPSURL, Constants.APPLICATION_JSON, accessTokenString); }
Example 8
Source File: ESBJAVA3770DropLargePayloadsPreventESBFromOOMTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void setEnvironment() throws Exception { super.init(); serverConfigurationManager = new ServerConfigurationManager( new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); serverConfigurationManager.applyMIConfigurationWithRestart(new File( getESBResourceLocation() + File.separator + "passthru" + File.separator + "transport" + File.separator + "ESBJAVA3770" + File.separator + "deployment.toml")); }
Example 9
Source File: SoapServiceLCPromotionTestCase.java From product-es with Apache License 2.0 | 5 votes |
@DataProvider private static TestUserMode[][] userModeProvider() { return new TestUserMode[][]{ new TestUserMode[]{TestUserMode.SUPER_TENANT_ADMIN} // new TestUserMode[]{TestUserMode.TENANT_USER}, }; }
Example 10
Source File: JMSInboundTransportTestCase.java From product-ei with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) protected void init() throws Exception { super.init(); serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); OMElement synapse = esbUtils.loadResource("/artifacts/ESB/jms/inbound/transport/jms_transport_proxy_service.xml"); updateESBConfiguration(JMSEndpointManager.setConfigurations(synapse)); inboundAdminClient = new InboundAdminClient(context.getContextUrls().getBackEndUrl(),getSessionCookie()); }
Example 11
Source File: ReadienssProbeTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(); client = new SimpleHttpClient(); headers = new HashMap<>(); headers.put("Accept", "application/json"); serverConfigurationManager = new ServerConfigurationManager( new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN)); }
Example 12
Source File: Sample264TestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(); context = new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN); logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie()); logViewerClient.clearLogs(); Thread.sleep(2000); loadSampleESBConfiguration(264); }
Example 13
Source File: CCOMMONS8SetTenantDomainTest.java From product-ei with Apache License 2.0 | 5 votes |
@BeforeClass public void init() throws Exception { super.init(); regTestContext = new AutomationContext("ESB", "esbsRegTest", TestUserMode.SUPER_TENANT_ADMIN); startupParameterMap = new HashMap<String, String>(); startupParameterMap.put("-DportOffset", "230"); String backEndRegUrl = "https://" + context.getInstance().getHosts().get("default") + ":" + context.getInstance().getPorts().get("https") + "/registry"; changeRegistryFile(getClass().getResource(COMMON_FILE_LOCATION + "registry-template.xml").getPath(), backEndRegUrl); testServerManager = new TestServerManager(regTestContext, null, startupParameterMap) { public void configureServer() throws AutomationFrameworkException { try { File sourceFile = new File(getClass().getResource(COMMON_FILE_LOCATION + "registry.xml").getPath()); //copying registry.xml file to conf folder FileManager.copyFile(sourceFile, this.getCarbonHome() + File.separator + "repository" + File.separator + "conf" + File.separator + "registry.xml"); } catch (IOException e) { throw new AutomationFrameworkException(e.getMessage(), e); } } }; }
Example 14
Source File: SOAPTestCase.java From product-cep with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(TestUserMode.SUPER_TENANT_ADMIN); String loggedInSessionCookie = getSessionCookie(); eventStreamManagerAdminServiceClient = configurationUtil.getEventStreamManagerAdminServiceClient( backendURL, loggedInSessionCookie); eventPublisherAdminServiceClient = configurationUtil.getEventPublisherAdminServiceClient( backendURL, loggedInSessionCookie); eventSimulatorAdminServiceClient = configurationUtil.getEventSimulatorAdminServiceClient( backendURL, loggedInSessionCookie); Thread.sleep(45000); }
Example 15
Source File: SoapServiceVersioningTestCase.java From product-es with Apache License 2.0 | 5 votes |
@DataProvider private static TestUserMode[][] userModeProvider() { return new TestUserMode[][]{ new TestUserMode[]{TestUserMode.SUPER_TENANT_ADMIN} // new TestUserMode[]{TestUserMode.TENANT_USER}, }; }
Example 16
Source File: MessageProcessorPersistenceTestCase.java From product-ei with Apache License 2.0 | 5 votes |
@BeforeClass(alwaysRun = true) public void init() throws Exception { super.init(); serverConfigurationManager = new ServerConfigurationManager(contextUrls.getBackEndUrl(), TestUserMode.SUPER_TENANT_ADMIN); synapseConfigAdminClient = new SynapseConfigAdminClient(contextUrls.getBackEndUrl(), getSessionCookie()); }
Example 17
Source File: PropertyIntegrationJmsCoorelationIDPropertyTestCase.java From product-ei with Apache License 2.0 | 4 votes |
@BeforeClass(alwaysRun = true) public void setEnvironment() throws Exception { super.init(); context = new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN); }
Example 18
Source File: WildCardSearch.java From product-es with Apache License 2.0 | 4 votes |
@DataProvider private static TestUserMode[][] userModeProvider() { return new TestUserMode[][] { new TestUserMode[] { TestUserMode.SUPER_TENANT_ADMIN } // new TestUserMode[]{TestUserMode.TENANT_USER}, }; }
Example 19
Source File: ESIntegrationTest.java From product-es with Apache License 2.0 | 4 votes |
protected void init() throws Exception { userMode = TestUserMode.SUPER_TENANT_ADMIN; init(userMode); }
Example 20
Source File: LZ4CompressCompatibilityTestCase.java From product-ei with Apache License 2.0 | 3 votes |
/** * Prepare environment for tests. * * @throws LoginAuthenticationExceptionException * @throws IOException * @throws XPathExpressionException * @throws URISyntaxException * @throws SAXException * @throws XMLStreamException */ @BeforeClass(alwaysRun = true) public void init() throws LoginAuthenticationExceptionException, IOException, XPathExpressionException, URISyntaxException, SAXException, XMLStreamException, AutomationUtilException { super.initCluster(TestUserMode.SUPER_TENANT_ADMIN); super.initAndesAdminClients(); }