tests: create keyspace statement test case

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
Pekka Enberg
2015-03-04 14:34:56 +02:00
parent e1948dcc0c
commit 3f019ee9c0

View File

@@ -72,6 +72,17 @@ static future<> require_column_has_value(distributed<database>& ddb, const sstri
});
}
SEASTAR_TEST_CASE(test_create_keyspace_statement) {
auto db = make_shared<distributed<database>>();
auto state = make_shared<conversation_state>(*db, ks_name);
return db->start().then([state] {
return state->execute_cql("create keyspace ks with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };").discard_result();
}).finally([db] {
return db->stop().finally([db] {});
});
}
SEASTAR_TEST_CASE(test_insert_statement) {
auto db = make_shared<distributed<database>>();
auto state = make_shared<conversation_state>(*db, ks_name);