use of com.yahoo.vespa.config.storage.StorDevicesConfig in project vespa by vespa-engine.
the class StorageNodeTest method verifyDiskPathConfigIsNotSetForNonHosted.
@Test
public void verifyDiskPathConfigIsNotSetForNonHosted() {
StorDevicesConfig config = getConfig(false);
assertEquals(0, config.disk_path().size());
}
use of com.yahoo.vespa.config.storage.StorDevicesConfig in project vespa by vespa-engine.
the class StorageClusterTest method testRootFolder.
@Test
public void testRootFolder() throws Exception {
String xml = "<cluster id=\"storage\">\n" + " <documents/>" + " <group>\n" + " <node distribution-key=\"0\" hostalias=\"mockhost\"/>\n" + " </group>\n" + "</cluster>";
ContentCluster cluster = ContentClusterUtils.createCluster(xml, new MockRoot());
StorageNode node = cluster.getStorageNodes().getChildren().get("0");
{
StorDevicesConfig.Builder builder = new StorDevicesConfig.Builder();
node.getConfig(builder);
StorDevicesConfig config = new StorDevicesConfig(builder);
assertEquals(getDefaults().underVespaHome("var/db/vespa/vds/storage/storage/0"), config.root_folder());
}
{
StorServerConfig.Builder builder = new StorServerConfig.Builder();
cluster.getStorageNodes().getConfig(builder);
node.getConfig(builder);
StorServerConfig config = new StorServerConfig(builder);
assertEquals(getDefaults().underVespaHome("var/db/vespa/vds/storage/storage/0"), config.root_folder());
}
{
StorServerConfig.Builder builder = new StorServerConfig.Builder();
cluster.getDistributorNodes().getConfig(builder);
cluster.getDistributorNodes().getChildren().get("0").getConfig(builder);
StorServerConfig config = new StorServerConfig(builder);
assertEquals(getDefaults().underVespaHome("var/db/vespa/vds/storage/distributor/0"), config.root_folder());
}
}
use of com.yahoo.vespa.config.storage.StorDevicesConfig in project vespa by vespa-engine.
the class StorageNodeTest method verifyDiskPathConfigIsSetForVds.
@Test
public void verifyDiskPathConfigIsSetForVds() {
StorDevicesConfig config = getConfig(true);
assertEquals(1, config.disk_path().size());
assertEquals(Defaults.getDefaults().underVespaHome("var/db/vespa/vds/zoo/storage/0/disks/d0"), config.disk_path(0));
}
Aggregations