Search in sources :

Example 1 with EncryptionComponent

use of io.syndesis.server.dao.manager.EncryptionComponent in project syndesis by syndesisio.

the class IntegrationHandlerTest method setUp.

@Before
public void setUp() {
    DataManager manager = mock(DataManager.class);
    Validator validator = mock(Validator.class);
    openShiftService = mock(OpenShiftService.class);
    inspectors = mock(Inspectors.class);
    handler = new IntegrationHandler(manager, openShiftService, validator, inspectors, new EncryptionComponent(null));
}
Also used : IntegrationHandler(io.syndesis.server.endpoint.v1.handler.integration.IntegrationHandler) Inspectors(io.syndesis.server.inspector.Inspectors) OpenShiftService(io.syndesis.server.openshift.OpenShiftService) EncryptionComponent(io.syndesis.server.dao.manager.EncryptionComponent) DataManager(io.syndesis.server.dao.manager.DataManager) Validator(javax.validation.Validator) Before(org.junit.Before)

Example 2 with EncryptionComponent

use of io.syndesis.server.dao.manager.EncryptionComponent in project syndesis by syndesisio.

the class DataManagerTest method setup.

@Before
public void setup() {
    cacheManager = new LRUCacheManager(100);
    EncryptionComponent encryptionComponent = new EncryptionComponent(null);
    ResourceLoader resourceLoader = new DefaultResourceLoader();
    // Create Data Manager
    dataManager = new DataManager(cacheManager, Collections.emptyList(), null, encryptionComponent, resourceLoader);
    dataManager.init();
    dataManager.resetDeploymentData();
}
Also used : ResourceLoader(org.springframework.core.io.ResourceLoader) DefaultResourceLoader(org.springframework.core.io.DefaultResourceLoader) EncryptionComponent(io.syndesis.server.dao.manager.EncryptionComponent) DataManager(io.syndesis.server.dao.manager.DataManager) LRUCacheManager(io.syndesis.common.util.cache.LRUCacheManager) DefaultResourceLoader(org.springframework.core.io.DefaultResourceLoader) Before(org.junit.Before)

Example 3 with EncryptionComponent

use of io.syndesis.server.dao.manager.EncryptionComponent in project syndesis by syndesisio.

the class MetricsCollectorTest method before.

@Before
public void before() throws IOException, ParseException {
    JdbcDataSource ds = new JdbcDataSource();
    ds.setURL("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL");
    DBI dbi = new DBI(ds);
    this.jsondb = new SqlJsonDB(dbi, null, Arrays.asList(new Index("/pair", "key")));
    try {
        this.jsondb.dropTables();
    } catch (Exception e) {
    }
    this.jsondb.createTables();
    jsondbRM = new JsonDBRawMetrics(jsondb);
    load();
    CacheManager cacheManager = new LRUCacheManager(100);
    EncryptionComponent encryptionComponent = new EncryptionComponent(null);
    ResourceLoader resourceLoader = new DefaultResourceLoader();
    // Create Data Manager
    dataManager = new DataManager(cacheManager, Collections.emptyList(), null, encryptionComponent, resourceLoader);
    intMH = new IntegrationMetricsHandler(dataManager);
}
Also used : DefaultResourceLoader(org.springframework.core.io.DefaultResourceLoader) ResourceLoader(org.springframework.core.io.ResourceLoader) JdbcDataSource(org.h2.jdbcx.JdbcDataSource) EncryptionComponent(io.syndesis.server.dao.manager.EncryptionComponent) DBI(org.skife.jdbi.v2.DBI) Index(io.syndesis.server.jsondb.impl.Index) DataManager(io.syndesis.server.dao.manager.DataManager) ParseException(java.text.ParseException) IOException(java.io.IOException) SqlJsonDB(io.syndesis.server.jsondb.impl.SqlJsonDB) LRUCacheManager(io.syndesis.common.util.cache.LRUCacheManager) CacheManager(io.syndesis.common.util.cache.CacheManager) LRUCacheManager(io.syndesis.common.util.cache.LRUCacheManager) DefaultResourceLoader(org.springframework.core.io.DefaultResourceLoader) Before(org.junit.Before)

Aggregations

DataManager (io.syndesis.server.dao.manager.DataManager)3 EncryptionComponent (io.syndesis.server.dao.manager.EncryptionComponent)3 Before (org.junit.Before)3 LRUCacheManager (io.syndesis.common.util.cache.LRUCacheManager)2 DefaultResourceLoader (org.springframework.core.io.DefaultResourceLoader)2 ResourceLoader (org.springframework.core.io.ResourceLoader)2 CacheManager (io.syndesis.common.util.cache.CacheManager)1 IntegrationHandler (io.syndesis.server.endpoint.v1.handler.integration.IntegrationHandler)1 Inspectors (io.syndesis.server.inspector.Inspectors)1 Index (io.syndesis.server.jsondb.impl.Index)1 SqlJsonDB (io.syndesis.server.jsondb.impl.SqlJsonDB)1 OpenShiftService (io.syndesis.server.openshift.OpenShiftService)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1 Validator (javax.validation.Validator)1 JdbcDataSource (org.h2.jdbcx.JdbcDataSource)1 DBI (org.skife.jdbi.v2.DBI)1