Add methods for changing the active MaxScale instance

The new function allows two MaxScale instances to be controlled via the
same TestConnections object. This will allow testing of Maxscale clusters.
This commit is contained in:
Markus Mäkelä
2017-10-04 10:57:12 +03:00
parent 9f74878794
commit 503e768d80
2 changed files with 63 additions and 0 deletions

View File

@ -7,6 +7,12 @@
#include <pthread.h>
#include <sys/time.h>
enum test_target
{
MXS_PRIMARY,
MXS_SECONDARY
};
/**
* @brief Class contains references to Master/Slave and Galera test setups
* Test setup should consist of two setups: one Master/Slave and one Galera.
@ -123,6 +129,12 @@ public:
*/
char maxscale_IP[1024];
/** IPv4 and IPv6 addresses for the primary and secondary instances */
std::string primary_maxscale_IP;
std::string primary_maxscale_IP6;
std::string secondary_maxscale_IP;
std::string secondary_maxscale_IP6;
/**
* @brief Maxscale_IP6 Maxscale machine IP address (IPv6)
*/
@ -715,6 +727,13 @@ public:
* @param dest Destination file name for actual configuration file
*/
void process_template(const char *src, const char *dest = "/etc/maxscale.cnf");
/**
* @brief Change the target MaxScale
*
* @param target Either MXS_PRIMARY or MXS_SECONDARY
*/
void set_active_maxscale(enum test_target target);
};
/**