1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Travis fixes:

server verification still fails due to wrong hostname - these tests are now disabled for Travis only
Disable test when testing against a MySQL server.
This commit is contained in:
Georg Richter
2020-03-16 14:02:12 +01:00
parent d32add15c8
commit 960dca55ae
3 changed files with 21 additions and 1 deletions

View File

@@ -1428,7 +1428,11 @@ static int test_sslenforce(MYSQL *unused __attribute__((unused)))
static int test_conc457(MYSQL *mysql)
{
MYSQL_RES *result= mysql_list_processes(mysql);
MYSQL_RES *result;
SKIP_MYSQL(mysql);
result= mysql_list_processes(mysql);
FAIL_IF(mysql_field_count(mysql) != 9, "expected 9 columns");
mysql_free_result(result);

View File

@@ -66,6 +66,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* prevent warnings on Win64 by using STMT_LEN instead of strlen */
#define STMT_LEN(A) (unsigned long)strlen((A))
#define SKIP_TRAVIS()\
if (getenv("TRAVIS"))\
{\
diag("Skip test on Travis CI");\
return SKIP;\
}
#define SKIP_MYSQL(mysql)\
if (!mariadb_connection(mysql))
{
diag("Skip test for non MariaDB server");
return OK;
}
#define check_mysql_rc(rc, mysql) \
if (rc)\
{\

View File

@@ -625,6 +625,8 @@ static int verify_ssl_server_cert(MYSQL *unused __attribute__((unused)))
if (!hostname || !strcmp(hostname, "localhost"))
return SKIP;
SKIP_TRAVIS();
mysql= mysql_init(NULL);
FAIL_IF(!mysql, "Can't allocate memory");