org.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager Java Examples

The following examples show how to use org.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager. 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: CCOMMONS8SetTenantDomainTest.java    From product-ei with Apache License 2.0 5 votes vote down vote up
@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);
            }
        }
    };

}