Search in sources :

Example 46 with MountInfoProvider

use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.

the class CugUtilTest method testGetSupportedPathsMountsBelowSupportedPath2.

@Test(expected = IllegalStateException.class)
public void testGetSupportedPathsMountsBelowSupportedPath2() {
    MountInfoProvider mip = Mounts.newBuilder().mount("private", "/libs", SUPPORTED_PATH + "/any/path/below").build();
    CugUtil.getSupportedPaths(CUG_CONFIG, mip);
}
Also used : MountInfoProvider(org.apache.jackrabbit.oak.spi.mount.MountInfoProvider) Test(org.junit.Test)

Example 47 with MountInfoProvider

use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.

the class CugUtilTest method testGetSupportedPathsWithDifferentMounts.

@Test
public void testGetSupportedPathsWithDifferentMounts() {
    Set<String> expected = CUG_CONFIG.getConfigValue(PARAM_CUG_SUPPORTED_PATHS, ImmutableSet.<String>of());
    MountInfoProvider mip = Mounts.newBuilder().mount("private", "/libs", "/apps", "/nonCugPath").build();
    assertNotSame(expected, CugUtil.getSupportedPaths(CUG_CONFIG, mip));
    assertEquals(expected, CugUtil.getSupportedPaths(CUG_CONFIG, mip));
}
Also used : MountInfoProvider(org.apache.jackrabbit.oak.spi.mount.MountInfoProvider) Test(org.junit.Test)

Aggregations

MountInfoProvider (org.apache.jackrabbit.oak.spi.mount.MountInfoProvider)47 Test (org.junit.Test)38 MemoryNodeStore (org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore)14 NodeStore (org.apache.jackrabbit.oak.spi.state.NodeStore)9 NodeBuilder (org.apache.jackrabbit.oak.spi.state.NodeBuilder)7 NodeState (org.apache.jackrabbit.oak.spi.state.NodeState)7 AbstractSecurityTest (org.apache.jackrabbit.oak.AbstractSecurityTest)6 Mount (org.apache.jackrabbit.oak.spi.mount.Mount)6 IndexUpdateProvider (org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider)5 EditorHook (org.apache.jackrabbit.oak.spi.commit.EditorHook)5 Mounts.defaultMountInfoProvider (org.apache.jackrabbit.oak.spi.mount.Mounts.defaultMountInfoProvider)5 SimpleMountInfoProvider (org.apache.jackrabbit.oak.spi.mount.SimpleMountInfoProvider)5 IOException (java.io.IOException)4 IndexCopier (org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier)3 IndexTracker (org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker)3 LuceneIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorProvider)3 LuceneIndexProvider (org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider)3 DefaultIndexReaderFactory (org.apache.jackrabbit.oak.plugins.index.lucene.reader.DefaultIndexReaderFactory)3 LuceneIndexReaderFactory (org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory)3 DefaultNodeStateDiff (org.apache.jackrabbit.oak.spi.state.DefaultNodeStateDiff)3