MXS-2220 Change server name to constant string

This commit is contained in:
Esa Korhonen
2018-12-19 15:15:02 +02:00
parent 5fc2c1f49c
commit 40485d746c
37 changed files with 194 additions and 173 deletions

View File

@ -79,7 +79,8 @@ int test(bool success, const char* zHost, const char* zUser, const char* zPasswo
MXS_CONFIG* config = config_get_global_options();
config->local_address = const_cast<char*>(zAddress);
Server server;
Server* pServer = Server::create_test_server();
Server& server = *pServer;
strcpy(server.address, zHost);
server.port = 3306;

View File

@ -112,7 +112,7 @@ bool test_load_config(const char* input, SERVER* server)
MXS_CONFIG_PARAMETER* param = obj->parameters;
config_add_defaults(obj, config_server_params);
TEST(strcmp(obj->object, server->name) == 0, "Server names differ");
TEST(strcmp(obj->object, server->name()) == 0, "Server names differ");
TEST(strcmp(server->address, config_get_param(param, "address")->value) == 0,
"Server addresses differ");
TEST(strcmp(server->protocol, config_get_param(param, "protocol")->value) == 0,