Skip to content

Commit

Permalink
Improved tests auxiliary variables definition and replaced hardcoded …
Browse files Browse the repository at this point in the history
…server values
  • Loading branch information
JavierJF committed May 15, 2020
1 parent c8b9981 commit 1276c26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 6 additions & 7 deletions test/tap/tests/reg_test_1493-mixed_compression-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ int main(int argc, char** argv) {
MYSQL_QUERY(proxysql_admin, load_mysql_queries_runtime);

// Mixed compressed / uncompressed queries test #1493
const char* mysql_client = "mysql";
std::string tg_port = std::string("-P") + std::to_string(cl.port);
std::string name = std::string("-u") + cl.username;
std::string pass = std::string("-p") + cl.password;

std::vector<const char*> n_auth_cargs = { "mysql", name.c_str(), pass.c_str(), "-h", cl.host, tg_port.c_str(), "-C", "-e", "select 1", "--default-auth=mysql_native_password" };
std::vector<const char*> n_auth_args = { "mysql", name.c_str(), pass.c_str(), "-h", cl.host, tg_port.c_str(), "-e", "select 1", "--default-auth=mysql_native_password" };
const std::string mysql_client = "mysql";
const std::string tg_port = std::string("-P") + std::to_string(cl.port);
const std::string name = std::string("-u") + cl.username;
const std::string pass = std::string("-p") + cl.password;
const std::vector<const char*> n_auth_cargs = { "mysql", name.c_str(), pass.c_str(), "-h", cl.host, tg_port.c_str(), "-C", "-e", "select 1", "--default-auth=mysql_native_password" };
const std::vector<const char*> n_auth_args = { "mysql", name.c_str(), pass.c_str(), "-h", cl.host, tg_port.c_str(), "-e", "select 1", "--default-auth=mysql_native_password" };

// Query the mysql server in a compressed connection
std::string result = "";
Expand Down
7 changes: 5 additions & 2 deletions test/tap/tests/reg_test_2793-compression-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ int main(int argc, char** argv) {

plan(1);

const char* mysql_client = "mysql";
std::vector<const char*> cargs = { "mysql", "-uroot", "-proot", "-h", "127.0.0.1", "-P6033", "-C", "-e", "select 1" };
const std::string mysql_client = "mysql";
const std::string name = std::string("-u") + cl.username;
const std::string pass = std::string("-p") + cl.password;
const std::string tg_port = std::string("-P") + std::to_string(cl.port);
const std::vector<const char*> cargs = { "mysql", name.c_str(), pass.c_str(), "-h", cl.host, tg_port.c_str(), "-C", "-e", "select 1" };

// Query the mysql server in a compressed connection
std::string result = "";
Expand Down

0 comments on commit 1276c26

Please sign in to comment.