use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CompositeMemoryStoreFixture method createNodeStore.
@Override
public NodeStore createNodeStore() {
MountInfoProvider mip = Mounts.newBuilder().readOnlyMount("temp", MOUNT_PATH).build();
NodeStore globalStore = new MemoryNodeStore();
NodeStore tempMount = new MemoryNodeStore();
return new CompositeNodeStore.Builder(mip, globalStore).addMount("temp", tempMount).build();
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CugUtilTest method testGetSupportedPathsMountsAboveSupportedPath.
@Test(expected = IllegalStateException.class)
public void testGetSupportedPathsMountsAboveSupportedPath() {
MountInfoProvider mip = Mounts.newBuilder().mount("private", PathUtils.ROOT_PATH).build();
CugUtil.getSupportedPaths(CUG_CONFIG, mip);
}
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);
}
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));
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class SimpleMountInfoProviderTest method mountsPlacedUnder.
@Test
public void mountsPlacedUnder() {
MountInfoProvider mip = Mounts.newBuilder().mount("first", "/b").mount("second", "/d", "/b/a").mount("third", "/h", "/b/c").build();
Collection<Mount> mountsContainedBetweenPaths = mip.getMountsPlacedUnder("/b");
assertEquals(2, mountsContainedBetweenPaths.size());
}
Aggregations