PragmaTwice commented on code in PR #1047:
URL:
https://github.com/apache/incubator-kvrocks/pull/1047#discussion_r1007591934
##########
tests/cppunit/config_test.cc:
##########
@@ -133,6 +133,33 @@ TEST(Config, GetAndSet) {
}
}
+TEST(Config, GetAndSetRenameCommand) {
+ const char *path = "test.conf";
+ unlink(path);
+
+ std::ostringstream string_stream;
+ string_stream << "rename-command KEYS KEYS_NEW"
+ << "\n";
+ string_stream << "rename-command GET GET_NEW"
+ << "\n";
+ string_stream << "rename-command SET SET_NEW"
+ << "\n";
+ std::ofstream output_file(path, std::ios::out);
+ output_file.write(string_stream.str().c_str(), string_stream.str().size());
Review Comment:
You can write something like `output_file << "rename-command KEYS
KEYS_NEW\n" << ...` directly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]