Passover cleanups.

1. Add ttl with reload test.
2. Removed several LOG(FATAL) messages and replaced them with error propagation.
3. Added scan test for all the options.
This commit is contained in:
Roman Gershman 2022-04-13 11:52:59 +03:00
parent 997d2dcb69
commit 6e5de7ac59
10 changed files with 77 additions and 35 deletions

View file

@ -287,13 +287,18 @@ auto BaseFamilyTest::AddFindConn(Protocol proto, std::string_view id) -> TestCon
return it->second.get();
}
RespVec BaseFamilyTest::Array(const RespExpr& expr) {
vector<string> BaseFamilyTest::StrArray(const RespExpr& expr) {
CHECK(expr.type == RespExpr::ARRAY || expr.type == RespExpr::NIL_ARRAY);
if (expr.type == RespExpr::NIL_ARRAY)
return RespVec{};
return vector<string>{};
const RespVec* src = get<RespVec*>(expr.u);
return *src;
vector<string> res(src->size());
for (size_t i = 0; i < src->size(); ++i) {
res[i] = ToSV(src->at(i).GetBuf());
}
return res;
}
} // namespace dfly