@BeforeClass(alwaysRun = true) public void configureServer() throws Exception { super.init(); String carbonHome = ServerConfigurationManager.getCarbonHome(); userMgtServerFile = new File( carbonHome + File.separator + "repository" + File.separator + "conf" + File.separator + "user-mgt.xml"); File userMgtConfigFile = new File( getISResourceLocation() + File.separator + "userMgt" + File.separator + "JdbcUserMgtConfig.xml"); scm = new ServerConfigurationManager(automationContext); scm.applyConfiguration(userMgtConfigFile, userMgtServerFile, true, true); doInit(); }
@AfterClass(alwaysRun = true) public void restoreServer() throws Exception { try { super.clean(); } finally { scm.restoreToLastConfiguration(); } }