use of com.palantir.timelock.config.ClusterConfiguration in project atlasdb by palantir.
the class TimeLockAgentTest method newServiceByClusterBootstrapConfigurationFailsIfDirectoryExists.
@Test
public void newServiceByClusterBootstrapConfigurationFailsIfDirectoryExists() throws IOException {
File mockFile = getMockFileWith(true, true);
ClusterConfiguration differentClusterConfig = ImmutableDefaultClusterConfiguration.builder().localServer(SERVER_A).addKnownNewServers(SERVER_A).cluster(PartialServiceConfiguration.of(ImmutableList.of(SERVER_A, "b", "c"), Optional.empty())).build();
assertThatThrownBy(() -> TimeLockAgent.verifyIsNewServiceInvariant(TimeLockInstallConfiguration.builder().paxos(PaxosInstallConfiguration.builder().dataDirectory(mockFile).isNewService(false).build()).build(), differentClusterConfig)).isInstanceOf(IllegalArgumentException.class);
}
Aggregations