.call();
}
@Test
public void testFallback() {
final ConfigOp config = geogig.command(ConfigOp.class);
// Set a value in global config, then try to get value from local even though
// we're not in a valid repository
config.setAction(ConfigAction.CONFIG_SET).setScope(ConfigScope.GLOBAL)
.setName("section.key").setValue("1").call();
Optional<Map<String, String>> value = config.setAction(ConfigAction.CONFIG_GET)
.setScope(ConfigScope.LOCAL).setName("section.key").setValue(null).call();
assertTrue(value.isPresent());
assertEquals("1", value.get().get("section.key"));
value = Optional.absent();
value = config.setAction(ConfigAction.CONFIG_GET).setScope(ConfigScope.LOCAL)
.setName("section.key").setValue("").call();
assertTrue(value.isPresent());
assertEquals("1", value.get().get("section.key"));
}