Search in sources :

Example 1 with ZMSFileChangeLogStoreFactory

use of com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStoreFactory in project athenz by yahoo.

the class ZMSFileChangeLogStoreFactoryTest method testCreateStore.

@Test
public void testCreateStore() {
    File privKeyFile = new File("src/test/resources/zts_private.pem");
    String privKey = Crypto.encodedFile(privKeyFile);
    PrivateKey pkey = Crypto.loadPrivateKey(Crypto.ybase64DecodeString(privKey));
    ZMSFileChangeLogStoreFactory factory = new ZMSFileChangeLogStoreFactory();
    ChangeLogStore store = factory.create(ZTS_DATA_STORE_PATH, pkey, "0", null);
    assertNotNull(store);
}
Also used : ChangeLogStore(com.yahoo.athenz.zts.store.ChangeLogStore) PrivateKey(java.security.PrivateKey) ZMSFileChangeLogStoreFactory(com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStoreFactory) File(java.io.File) Test(org.testng.annotations.Test)

Aggregations

ChangeLogStore (com.yahoo.athenz.zts.store.ChangeLogStore)1 ZMSFileChangeLogStoreFactory (com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStoreFactory)1 File (java.io.File)1 PrivateKey (java.security.PrivateKey)1 Test (org.testng.annotations.Test)1