use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class MountInfoProviderServiceTest method mountWithConfig_Paths.
@Test
public void mountWithConfig_Paths() throws Exception {
MockOsgi.activate(service, context.bundleContext(), ImmutableMap.<String, Object>of("mountedPaths", new String[] { "/a", "/b" }));
MountInfoProvider provider = context.getService(MountInfoProvider.class);
assertEquals(1, provider.getNonDefaultMounts().size());
Mount m = provider.getMountByName(MountInfoProviderService.PROP_MOUNT_NAME_DEFAULT);
assertNotNull(m);
Mount defMount = provider.getDefaultMount();
assertNotNull(defMount);
assertFalse(m.isReadOnly());
assertEquals(m, provider.getMountByPath("/a"));
assertEquals(defMount, provider.getMountByPath("/x"));
}
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);
}
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);
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CugConfigurationWithMountsTest method testMountAboveCugSupportedPath.
@Test(expected = IllegalStateException.class)
public void testMountAboveCugSupportedPath() {
MountInfoProvider mip = Mounts.newBuilder().mount("mnt", PathUtils.getParentPath(AbstractCugTest.SUPPORTED_PATH3)).build();
CugConfiguration configuration = createConfiguration(mip);
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CompositeNodeStoreBuilderTest method builderRejectsTooManyReadWriteStores_mixed.
@Test(expected = IllegalArgumentException.class)
public void builderRejectsTooManyReadWriteStores_mixed() {
MountInfoProvider mip = Mounts.newBuilder().mount("temp", "/tmp").readOnlyMount("readOnly", "/readOnly").build();
new CompositeNodeStore.Builder(mip, new MemoryNodeStore()).addMount("temp", new MemoryNodeStore()).addMount("readOnly", new MemoryNodeStore()).build();
}
Aggregations