Search in sources :

Example 1 with PostTestConstruct

use of org.codice.ddf.test.common.annotations.PostTestConstruct in project ddf by codice.

the class AbstractIntegrationTest method initFacades.

@SuppressWarnings({ "squid:S2696" /* writing to static ddfHome to share state between test methods */
})
@PostTestConstruct
public void initFacades() {
    RestAssured.config = RestAssuredConfig.config().xmlConfig(XmlConfig.xmlConfig().namespaceAware(false));
    ddfHome = System.getProperty(DDF_HOME_PROPERTY);
    adminConfig = new AdminConfig(configAdmin);
    Security security = new org.codice.ddf.security.impl.Security();
    ((org.codice.ddf.security.impl.Security) security).setSecurityLogger(new SecurityLoggerImpl(new SubjectUtils()));
    // This proxy runs the service manager as the system subject
    serviceManager = (ServiceManager) Proxy.newProxyInstance(AbstractIntegrationTest.class.getClassLoader(), ServiceManagerImpl.class.getInterfaces(), new ServiceManagerProxy(new ServiceManagerImpl(metatype, adminConfig, bundleContext, bundleService, features), security));
    catalogBundle = new CatalogBundle(serviceManager, adminConfig);
    securityPolicy = new SecurityPolicyConfigurator(serviceManager, configAdmin);
    urlResourceReaderConfigurator = new UrlResourceReaderConfigurator(configAdmin);
    console = new KarafConsole(bundleContext, features, sessionFactory);
}
Also used : SecurityLoggerImpl(ddf.security.audit.impl.SecurityLoggerImpl) SubjectUtils(ddf.security.service.impl.SubjectUtils) UrlResourceReaderConfigurator(org.codice.ddf.itests.common.config.UrlResourceReaderConfigurator) Security(org.codice.ddf.security.Security) SecurityPolicyConfigurator(org.codice.ddf.itests.common.security.SecurityPolicyConfigurator) PostTestConstruct(org.codice.ddf.test.common.annotations.PostTestConstruct)

Aggregations

SecurityLoggerImpl (ddf.security.audit.impl.SecurityLoggerImpl)1 SubjectUtils (ddf.security.service.impl.SubjectUtils)1 UrlResourceReaderConfigurator (org.codice.ddf.itests.common.config.UrlResourceReaderConfigurator)1 SecurityPolicyConfigurator (org.codice.ddf.itests.common.security.SecurityPolicyConfigurator)1 Security (org.codice.ddf.security.Security)1 PostTestConstruct (org.codice.ddf.test.common.annotations.PostTestConstruct)1