Search in sources :

Example 1 with MountInfoProvider

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

the class CugUtilTest method testGetSupportedPathsMountsBelowSupportedPath.

@Test(expected = IllegalStateException.class)
public void testGetSupportedPathsMountsBelowSupportedPath() {
    MountInfoProvider mip = Mounts.newBuilder().mount("private", "/libs", "/apps").build();
    CugUtil.getSupportedPaths(ConfigurationParameters.of(PARAM_CUG_SUPPORTED_PATHS, new String[] { "/" }), mip);
}
Also used : MountInfoProvider(org.apache.jackrabbit.oak.spi.mount.MountInfoProvider) Test(org.junit.Test)

Example 2 with MountInfoProvider

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

the class CugUtilTest method testGetSupportedPathsMountsAboveSupportedPath2.

@Test(expected = IllegalStateException.class)
public void testGetSupportedPathsMountsAboveSupportedPath2() {
    MountInfoProvider mip = Mounts.newBuilder().mount("private", PathUtils.getAncestorPath(SUPPORTED_PATH3, 2)).build();
    CugUtil.getSupportedPaths(CUG_CONFIG, mip);
}
Also used : MountInfoProvider(org.apache.jackrabbit.oak.spi.mount.MountInfoProvider) Test(org.junit.Test)

Example 3 with MountInfoProvider

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

the class CugUtilTest method testGetSupportedPathsMountsAtSupportedPath.

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

Example 4 with MountInfoProvider

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

the class CugConfigurationWithMountsTest method testMountBelowCugSupportedPath.

@Test(expected = IllegalStateException.class)
public void testMountBelowCugSupportedPath() {
    MountInfoProvider mip = Mounts.newBuilder().mount("mnt", AbstractCugTest.SUPPORTED_PATH + "/mount").build();
    CugConfiguration configuration = createConfiguration(mip);
}
Also used : MountInfoProvider(org.apache.jackrabbit.oak.spi.mount.MountInfoProvider) AbstractSecurityTest(org.apache.jackrabbit.oak.AbstractSecurityTest) Test(org.junit.Test)

Example 5 with MountInfoProvider

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

the class CugConfigurationWithMountsTest method testMountAtRootWithSupportedPaths.

@Test(expected = IllegalStateException.class)
public void testMountAtRootWithSupportedPaths() {
    MountInfoProvider mip = Mounts.newBuilder().mount("mnt", PathUtils.ROOT_PATH).build();
    CugConfiguration configuration = createConfiguration(mip);
}
Also used : MountInfoProvider(org.apache.jackrabbit.oak.spi.mount.MountInfoProvider) AbstractSecurityTest(org.apache.jackrabbit.oak.AbstractSecurityTest) 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