test/lib/simple_schema: do not hardwire ks.cf

instead, query the name of ks and cf from the scheme. this change
prepare us for the a simple_schema whose ks and cf can be customized
by its contructor.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2023-07-21 18:38:07 +08:00
parent 5860820934
commit 306439d3aa

View File

@@ -84,8 +84,9 @@ public:
}
sstring cql() const {
return format("CREATE TABLE ks.cf (pk text, ck text, v text, s1 text{}{}, PRIMARY KEY (pk, ck))", _ws ? " static" : "",
_wc ? ", c1 map<text, text>" : "");
return format("CREATE TABLE {}.{} (pk text, ck text, v text, s1 text{}{}, PRIMARY KEY (pk, ck))",
_s->keypace_name(), _s->element_name(),
_ws ? " static" : "", _wc ? ", c1 map<text, text>" : "");
}
clustering_key make_ckey(sstring ck) {