Search in sources :

Example 21 with ZMSFileChangeLogStore

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

the class ZMSFileChangeLogStoreTest method testFullRefreshSupport.

@Test
public void testFullRefreshSupport() {
    ZMSFileChangeLogStore fstore = new ZMSFileChangeLogStore(FSTORE_PATH, null, null);
    assertTrue(fstore.supportsFullRefresh());
}
Also used : ZMSFileChangeLogStore(com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStore) Test(org.testng.annotations.Test)

Example 22 with ZMSFileChangeLogStore

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

the class ZMSFileChangeLogStoreTest method deleteNonExistent.

@Test
public void deleteNonExistent() {
    ZMSFileChangeLogStore fstore = new ZMSFileChangeLogStore(FSTORE_PATH, null, null);
    fstore.delete("test1");
    assertTrue(true);
}
Also used : ZMSFileChangeLogStore(com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStore) Test(org.testng.annotations.Test)

Example 23 with ZMSFileChangeLogStore

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

the class ZMSFileChangeLogStoreTest method scanHidden.

@Test
public void scanHidden() {
    ZMSFileChangeLogStore fstore = new ZMSFileChangeLogStore(FSTORE_PATH, null, null);
    Struct data = new Struct();
    data.put("key", "val1");
    fstore.put("test1", JSON.bytes(data));
    data = new Struct();
    data.put("key", "val1");
    fstore.put(".test2", JSON.bytes(data));
    data = new Struct();
    data.put("key", "val1");
    fstore.put(".test3", JSON.bytes(data));
    List<String> ls = fstore.scan();
    assertEquals(ls.size(), 1);
    assertTrue(ls.contains("test1"));
}
Also used : ZMSFileChangeLogStore(com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStore) Struct(com.yahoo.rdl.Struct) Test(org.testng.annotations.Test)

Aggregations

ZMSFileChangeLogStore (com.yahoo.athenz.zts.store.impl.ZMSFileChangeLogStore)23 Test (org.testng.annotations.Test)23 SignedDomain (com.yahoo.athenz.zms.SignedDomain)11 SimplePrincipal (com.yahoo.athenz.auth.impl.SimplePrincipal)9 ChangeLogStore (com.yahoo.athenz.zts.store.ChangeLogStore)9 DataStore (com.yahoo.athenz.zts.store.DataStore)9 MockZMSFileChangeLogStore (com.yahoo.athenz.zts.store.impl.MockZMSFileChangeLogStore)9 Struct (com.yahoo.rdl.Struct)7 Principal (com.yahoo.athenz.auth.Principal)6 AuditLogMsgBuilder (com.yahoo.athenz.common.server.log.AuditLogMsgBuilder)6 AuditLogger (com.yahoo.athenz.common.server.log.AuditLogger)6 DefaultAuditLogMsgBuilder (com.yahoo.athenz.common.server.log.impl.DefaultAuditLogMsgBuilder)6 DefaultAuditLogger (com.yahoo.athenz.common.server.log.impl.DefaultAuditLogger)6 HashSet (java.util.HashSet)6 HttpServletRequest (javax.servlet.http.HttpServletRequest)6 CertificateAuthority (com.yahoo.athenz.auth.impl.CertificateAuthority)3 InstanceCertManager (com.yahoo.athenz.zts.cert.InstanceCertManager)3 X509CertRecord (com.yahoo.athenz.zts.cert.X509CertRecord)3 Path (java.nio.file.Path)3 X509Certificate (java.security.cert.X509Certificate)3