Build the replicaton-manager test

The test wasn't built as it is not a part of the test suite. The
executable should be built but it should not be added to the test suite.

Changed the management script to only add the configuration and added a
call to it at the start of the test.
This commit is contained in:
Markus Mäkelä
2017-10-24 23:24:39 +03:00
parent 94c066ff65
commit de800766ef
3 changed files with 10 additions and 15 deletions

View File

@ -563,7 +563,7 @@ add_test_executable(rwsplit_multi_stmt.cpp rwsplit_multi_stmt rwsplit_multi_stmt
add_test_executable(rwsplit_read_only_trx.cpp rwsplit_read_only_trx rwsplit_read_only_trx LABELS readwritesplit REPL_BACKEND)
# Test replication-manager with MaxScale
#add_test_executable(replication_manager.cpp replication_manager replication_manager LABELS maxscale REPL_BACKEND)
add_test_executable_notest(replication_manager.cpp replication_manager replication_manager LABELS maxscale REPL_BACKEND)
#add_test_executable_notest(replication_manager_2nodes.cpp replication_manager_2nodes replication_manager_2nodes LABELS maxscale REPL_BACKEND)
#add_test_executable_notest(replication_manager_3nodes.cpp replication_manager_3nodes replication_manager_3nodes LABELS maxscale REPL_BACKEND)

View File

@ -117,9 +117,6 @@ EOF
do_ssh <<EOF
sudo mkdir -p /etc/replication-manager/
sudo cp ./config.toml /etc/replication-manager/config.toml
sudo systemctl stop replication-manager
sudo replication-manager bootstrap --clean-all
sudo systemctl restart replication-manager
EOF
}

View File

@ -99,18 +99,16 @@ int main(int argc, char** argv)
TestConnections test(argc, argv);
// TODO: Figure out how to do this without having replication-manager pre-installed on the system
//
// test.tprintf("Installing replication-manager");
// int rc = system("./manage_mrm.sh install > manage_mrm.log");
// if (!WIFEXITED(rc) || WEXITSTATUS(rc) != 0)
// {
// test.tprintf("Failed to install replication-manager, see manage_mrm.log for more details");
// return -1;
// }
test.tprintf("Installing replication-manager");
int rc = system("new_replication_manager=yes ./manage_mrm.sh install > manage_mrm.log");
if (!WIFEXITED(rc) || WEXITSTATUS(rc) != 0)
{
test.tprintf("Failed to install replication-manager, see manage_mrm.log for more details");
return -1;
}
// // Wait a few seconds
// sleep(5);
// Wait a few seconds
sleep(5);
test.tprintf("Creating table and inserting data");
get_input();