diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index b8f7eabd3..e03567ef2 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -939,6 +939,9 @@ add_test_executable(mxs2300_history_pruning.cpp mxs2300_history_pruning mxs2300_ # MXS-2326: Routing hints aren't cloned in gwbuf_clone add_test_executable(mxs2326_hint_clone.cpp mxs2326_hint_clone mxs2326_hint_clone LABELS readwritesplit REPL_BACKEND) +# MXS-2417: Ignore persisted configs with load_persisted_configs=false +add_test_executable(mxs2417_ignore_persisted_cnf.cpp mxs2417_ignore_persisted_cnf mxs2417_ignore_persisted_cnf LABELS REPL_BACKEND) + ############################################ # BEGIN: binlogrouter and avrorouter tests # ############################################ diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mxs2417_ignore_persisted_cnf b/maxscale-system-test/cnf/maxscale.cnf.template.mxs2417_ignore_persisted_cnf new file mode 100644 index 000000000..2e90be3d1 --- /dev/null +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mxs2417_ignore_persisted_cnf @@ -0,0 +1,3 @@ +[maxscale] +threads=###threads### +load_persisted_configs=false diff --git a/maxscale-system-test/mxs2417_ignore_persisted_cnf.cpp b/maxscale-system-test/mxs2417_ignore_persisted_cnf.cpp new file mode 100644 index 000000000..75049f0d5 --- /dev/null +++ b/maxscale-system-test/mxs2417_ignore_persisted_cnf.cpp @@ -0,0 +1,24 @@ +/** + * MXS-2417: Ignore persisted configs with load_persisted_configs=false + * https://jira.mariadb.org/browse/MXS-2417 + */ + +#include "testconnections.h" + +int main(int argc, char* argv[]) +{ + TestConnections test(argc, argv); + + test.tprintf("Creating a server and verifying it exists"); + test.check_maxctrl("create server server1234 127.0.0.1 3306"); + test.check_maxctrl("show server server1234"); + + test.tprintf("Restarting MaxScale"); + test.maxscales->restart_maxscale(); + + test.tprintf("Creating the server again and verifying it is successful"); + test.check_maxctrl("create server server1234 127.0.0.1 3306"); + test.check_maxctrl("show server server1234"); + + return test.global_result; +}