You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Unit test fixes for server integration
- SSL tests require CERT_PATH. Subdirectory certs was removed. If Connector/C is build outside of the server tree, certification path has to be specified manually (-DCERT_PATH=/path/to/certs). - All tables and users will removed, if the test passed (otherwise mtr will complain).
This commit is contained in:
@@ -356,6 +356,8 @@ static int test_store_result(MYSQL *mysql)
|
||||
FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA");
|
||||
|
||||
mysql_stmt_close(stmt);
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_store_result");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -413,6 +415,8 @@ static int test_store_result1(MYSQL *mysql)
|
||||
FAIL_UNLESS(rc == 3, "rowcount != 3");
|
||||
|
||||
mysql_stmt_close(stmt);
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_store_result");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -495,6 +499,8 @@ static int test_store_result2(MYSQL *mysql)
|
||||
rc= mysql_stmt_fetch(stmt);
|
||||
FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA");
|
||||
mysql_stmt_close(stmt);
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_store_result");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -689,6 +695,8 @@ static int test_field_flags(MYSQL *mysql)
|
||||
FAIL_UNLESS(field->flags & NOT_NULL_FLAG, "Wrong flags for field 4");
|
||||
|
||||
mysql_free_result(result);
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_field_flags");
|
||||
check_mysql_rc(rc, mysql);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -737,6 +745,11 @@ static int test_field_names(MYSQL *mysql)
|
||||
rc++;
|
||||
FAIL_UNLESS(rc == 0, "rowcount != 0");
|
||||
mysql_free_result(result);
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_field_names1");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_field_names2");
|
||||
check_mysql_rc(rc, mysql);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -809,6 +822,8 @@ static int test_func_fields(MYSQL *mysql)
|
||||
FAIL_IF(field, "no more fields expected");
|
||||
|
||||
mysql_free_result(result);
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_dateformat");
|
||||
check_mysql_rc(rc, mysql);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user