Updated Branches: refs/heads/master 0eaf045e6 -> 68ab1118b
Commented out old stratos controller integration tests to be reviewed and added later Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/68ab1118 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/68ab1118 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/68ab1118 Branch: refs/heads/master Commit: 68ab1118b37704d7644769589881046320b5aaa9 Parents: 0eaf045 Author: Imesh Gunaratne <[email protected]> Authored: Thu Dec 26 18:39:27 2013 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Thu Dec 26 18:39:27 2013 +0530 ---------------------------------------------------------------------- .../integration/tests/LoginLogoutTestCase.java | 50 ++++----- .../tests/SecurityVerificationTestCase.java | 8 +- .../tests/StratosManagerTestServerManager.java | 58 +++++----- .../integration/tests/TenantMgtTestCase.java | 112 +++++++++---------- 4 files changed, 114 insertions(+), 114 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/68ab1118/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java ---------------------------------------------------------------------- diff --git a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java index ae08489..9ca01a4 100755 --- a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java +++ b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java @@ -16,34 +16,34 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.stratos.manager.integration.tests; +//package org.apache.stratos.manager.integration.tests; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.testng.annotations.Test; -import org.wso2.carbon.integration.framework.ClientConnectionUtil; -import org.wso2.carbon.integration.framework.LoginLogoutUtil; +//import org.apache.commons.logging.Log; +//import org.apache.commons.logging.LogFactory; +//import org.testng.annotations.Test; +//import org.wso2.carbon.integration.framework.ClientConnectionUtil; +//import org.wso2.carbon.integration.framework.LoginLogoutUtil; /** * A test case which tests logging in & logging out of a Carbon core server */ -public class LoginLogoutTestCase { - - private LoginLogoutUtil util = new LoginLogoutUtil(); - public static final Log log = LogFactory.getLog(LoginLogoutTestCase.class); - - @Test(groups = {"stratos.manager"}) - public void login() throws Exception { - log.info("****************************** LoginLogoutTestCase Start ******************************"); - ClientConnectionUtil.waitForPort(9763); - util.login(); - } - - @Test(groups = {"stratos.manager"}) - public void logout() throws Exception { - ClientConnectionUtil.waitForPort(9763); - util.logout(); - log.info("****************************** LoginLogoutTestCase End ******************************"); - } -} +//public class LoginLogoutTestCase { +// +// private LoginLogoutUtil util = new LoginLogoutUtil(); +// public static final Log log = LogFactory.getLog(LoginLogoutTestCase.class); +// +// @Test(groups = {"stratos.manager"}) +// public void login() throws Exception { +// log.info("****************************** LoginLogoutTestCase Start ******************************"); +// ClientConnectionUtil.waitForPort(9763); +// util.login(); +// } +// +// @Test(groups = {"stratos.manager"}) +// public void logout() throws Exception { +// ClientConnectionUtil.waitForPort(9763); +// util.logout(); +// log.info("****************************** LoginLogoutTestCase End ******************************"); +// } +//} http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/68ab1118/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java ---------------------------------------------------------------------- diff --git a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java index 1cfa9e0..3ec500f 100755 --- a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java +++ b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.stratos.manager.integration.tests; +//package org.apache.stratos.manager.integration.tests; -import org.wso2.carbon.integration.framework.SecurityVerificationTest; +//import org.wso2.carbon.integration.framework.SecurityVerificationTest; /** * Test to ensure that the WSO2 Stratos Manager is properly secured */ -public class SecurityVerificationTestCase extends SecurityVerificationTest { -} +//public class SecurityVerificationTestCase extends SecurityVerificationTest { +//} http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/68ab1118/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosManagerTestServerManager.java ---------------------------------------------------------------------- diff --git a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosManagerTestServerManager.java b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosManagerTestServerManager.java index 0a1c7e1..e4c15ed 100755 --- a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosManagerTestServerManager.java +++ b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosManagerTestServerManager.java @@ -16,39 +16,39 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.stratos.manager.integration.tests; +//package org.apache.stratos.manager.integration.tests; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.testng.annotations.AfterSuite; -import org.testng.annotations.BeforeSuite; -import org.wso2.carbon.integration.framework.TestServerManager; +//import org.apache.commons.logging.Log; +//import org.apache.commons.logging.LogFactory; +//import org.testng.annotations.AfterSuite; +//import org.testng.annotations.BeforeSuite; +//import org.wso2.carbon.integration.framework.TestServerManager; -import java.io.File; -import java.io.IOException; +//import java.io.File; +//import java.io.IOException; /** * Prepares the WSO2 AS for test runs, starts the server, and stops the server after * test runs */ -public class StratosManagerTestServerManager extends TestServerManager { - private static final Log log = LogFactory.getLog(StratosManagerTestServerManager.class); - - @Override - @BeforeSuite(timeOut = 300000) - public String startServer() throws IOException { - String carbonHome = super.startServer(); - System.setProperty("carbon.home", carbonHome); - return carbonHome; - } - - @Override - @AfterSuite(timeOut = 60000) - public void stopServer() throws Exception { - super.stopServer(); - } - - protected void copyArtifacts(String carbonHome) throws IOException { - } - -} +//public class StratosManagerTestServerManager extends TestServerManager { +// private static final Log log = LogFactory.getLog(StratosManagerTestServerManager.class); +// +// @Override +// @BeforeSuite(timeOut = 300000) +// public String startServer() throws IOException { +// String carbonHome = super.startServer(); +// System.setProperty("carbon.home", carbonHome); +// return carbonHome; +// } +// +// @Override +// @AfterSuite(timeOut = 60000) +// public void stopServer() throws Exception { +// super.stopServer(); +// } +// +// protected void copyArtifacts(String carbonHome) throws IOException { +// } +// +//} http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/68ab1118/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java ---------------------------------------------------------------------- diff --git a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java index 963e0a1..45e2a66 100755 --- a/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java +++ b/products/stratos-controller/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.stratos.manager.integration.tests; +//package org.apache.stratos.manager.integration.tests; import org.apache.axis2.client.ServiceClient; import org.apache.commons.logging.Log; @@ -35,58 +35,58 @@ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; -public class TenantMgtTestCase { - - private static String TenantMgtAdminServiceURL; - private static String TestTenantDomain; - public static final Log log = LogFactory.getLog(TenantMgtTestCase.class); - - @BeforeClass - public void init() { - log.info("****************************** TenantMgtTestCase Start ******************************"); - TestTenantDomain = "testcase.org"; - TenantMgtAdminServiceURL = "https://" + FrameworkSettings.HOST_NAME + ":" + - FrameworkSettings.HTTPS_PORT + "/services/TenantMgtAdminService"; - } - - @Test(groups = {"stratos.manager"}) - public void addTenantTest() throws Exception { - Calendar calender = new GregorianCalendar(); - calender.setTime(new Date()); - - TenantInfoBean tenantInfoBean = new TenantInfoBean(); - tenantInfoBean.setActive(true); - tenantInfoBean.setEmail("[email protected]"); - tenantInfoBean.setAdmin("admin"); - tenantInfoBean.setAdminPassword("admin123"); - tenantInfoBean.setTenantDomain(TestTenantDomain); - tenantInfoBean.setCreatedDate(calender); - tenantInfoBean.setFirstname("Fname"); - tenantInfoBean.setLastname("Lname"); - tenantInfoBean.setSuccessKey("true"); - tenantInfoBean.setUsagePlan("Demo"); - - TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL); - ServiceClient client = stub._getServiceClient(); - CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client); - - String result = stub.addTenant(tenantInfoBean); - Assert.assertTrue(stub.retrieveTenants()[0].getTenantDomain().equals(TestTenantDomain)); - - } - - @Test(groups = {"stratos.manager"}) - public void activateTenantTest() throws Exception { - TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL); - ServiceClient client = stub._getServiceClient(); - CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client); - stub.activateTenant(TestTenantDomain); - Assert.assertTrue(stub.retrieveTenants()[0].getActive()); - } - - @AfterClass - public void end(){ - log.info("****************************** TenantMgtTestCase End ******************************"); - } - -} +//public class TenantMgtTestCase { +// +// private static String TenantMgtAdminServiceURL; +// private static String TestTenantDomain; +// public static final Log log = LogFactory.getLog(TenantMgtTestCase.class); +// +// @BeforeClass +// public void init() { +// log.info("****************************** TenantMgtTestCase Start ******************************"); +// TestTenantDomain = "testcase.org"; +// TenantMgtAdminServiceURL = "https://" + FrameworkSettings.HOST_NAME + ":" + +// FrameworkSettings.HTTPS_PORT + "/services/TenantMgtAdminService"; +// } +// +// @Test(groups = {"stratos.manager"}) +// public void addTenantTest() throws Exception { +// Calendar calender = new GregorianCalendar(); +// calender.setTime(new Date()); +// +// TenantInfoBean tenantInfoBean = new TenantInfoBean(); +// tenantInfoBean.setActive(true); +// tenantInfoBean.setEmail("[email protected]"); +// tenantInfoBean.setAdmin("admin"); +// tenantInfoBean.setAdminPassword("admin123"); +// tenantInfoBean.setTenantDomain(TestTenantDomain); +// tenantInfoBean.setCreatedDate(calender); +// tenantInfoBean.setFirstname("Fname"); +// tenantInfoBean.setLastname("Lname"); +// tenantInfoBean.setSuccessKey("true"); +// tenantInfoBean.setUsagePlan("Demo"); +// +// TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL); +// ServiceClient client = stub._getServiceClient(); +// CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client); +// +// String result = stub.addTenant(tenantInfoBean); +// Assert.assertTrue(stub.retrieveTenants()[0].getTenantDomain().equals(TestTenantDomain)); +// +// } +// +// @Test(groups = {"stratos.manager"}) +// public void activateTenantTest() throws Exception { +// TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL); +// ServiceClient client = stub._getServiceClient(); +// CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client); +// stub.activateTenant(TestTenantDomain); +// Assert.assertTrue(stub.retrieveTenants()[0].getActive()); +// } +// +// @AfterClass +// public void end(){ +// log.info("****************************** TenantMgtTestCase End ******************************"); +// } +// +//}
