Added a no option test to ensure replication strategy and factor were
set to default values. Also the durable write were defaulted to true too.
This commit is contained in:
@@ -75,6 +75,30 @@ public class CreateKeyspaceCqlGeneratorTests {
|
||||
}
|
||||
}
|
||||
|
||||
public static class NoOptionsBasicTest extends CreateKeyspaceTest {
|
||||
|
||||
public String name = Utils.randomKeyspaceName();
|
||||
public Boolean durableWrites = true;
|
||||
|
||||
public Map<Option, Object> replicationMap = KeyspaceAttributes.newSimpleReplication();
|
||||
|
||||
@Override
|
||||
public CreateKeyspaceSpecification specification() {
|
||||
keyspace = name;
|
||||
|
||||
return CreateKeyspaceSpecification.createKeyspace().name(keyspace);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
prepare();
|
||||
|
||||
assertPreamble(keyspace, cql);
|
||||
assertReplicationMap(replicationMap, cql);
|
||||
assertDurableWrites(durableWrites, cql);
|
||||
}
|
||||
}
|
||||
|
||||
public static class NetworkTopologyTest extends CreateKeyspaceTest {
|
||||
|
||||
public String name = Utils.randomKeyspaceName();
|
||||
|
||||
Reference in New Issue
Block a user