Skip to content

Commit

Permalink
feat(ci): add mysql odbc test #4205
Browse files Browse the repository at this point in the history
  • Loading branch information
cunj123 committed Oct 26, 2023
1 parent 3a7d5eb commit 0b7bbf3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,22 @@ jobs:
- 3306:3306
steps:
- uses: actions/checkout@v3
- run: sudo apt -y update && sudo apt -y install libssl-dev unixodbc-dev libmysqlclient-dev
- run: ./configure --everything --no-samples --omit=ActiveRecord,ApacheConnector,CppParser,Crypto,Data/ODBC,Data/PostgreSQL,Data/SQLite,Encodings,JSON,JWT,MongoDB,Net,NetSSL_OpenSSL,NetSSL_Win,PDF,PageCompiler,PocoDoc,ProGen,Prometheus,Redis,SevenZip,Util,XML,Zip && make all -s -j4 && sudo make install
- run: sudo apt -y update && sudo apt -y install libssl-dev unixodbc-dev libmysqlclient-dev mysql-client
- run: |
wget https://dev.mysql.com/get/Downloads/Connector-ODBC/8.2/mysql-connector-odbc_8.2.0-1ubuntu22.04_amd64.deb
wget https://dev.mysql.com/get/Downloads/MySQL-8.2/mysql-community-client-plugins_8.2.0-1ubuntu22.04_amd64.deb
sudo dpkg -i mysql-community-client-plugins_8.2.0-1ubuntu22.04_amd64.deb mysql-connector-odbc_8.2.0-1ubuntu22.04_amd64.deb
- run: ./configure --everything --no-samples --omit=ActiveRecord,ApacheConnector,CppParser,Crypto,Data/PostgreSQL,Data/SQLite,Encodings,JSON,JWT,MongoDB,Net,NetSSL_OpenSSL,NetSSL_Win,PDF,PageCompiler,PocoDoc,ProGen,Prometheus,Redis,SevenZip,Util,XML,Zip && make all -s -j4 && sudo make install
- run: >-
sudo -s
EXCLUDE_TESTS="ActiveRecord ApacheConnector CppParser CppUnit Crypto Data Data/ODBC Data/PostgreSQL Data/SQLite Encodings Foundation JSON JWT MongoDB Net NetSSL_OpenSSL NetSSL_Win PDF PageCompiler PocoDoc ProGen Prometheus Redis SevenZip Util XML Zip"
EXCLUDE_TESTS="ActiveRecord ApacheConnector CppParser CppUnit Crypto Data Data/PostgreSQL Data/ODBC Data/SQLite Encodings Foundation JSON JWT MongoDB Net NetSSL_OpenSSL NetSSL_Win PDF PageCompiler PocoDoc ProGen Prometheus Redis SevenZip Util XML Zip"
./ci/runtests.sh
#To enable ODBC tests, uncomment the following lines
# - run: mysql -h 127.0.0.1 -u pocotest --password=pocotest -e "DROP DATABASE pocotest; CREATE DATABASE pocotest"
# - run: >-
# sudo -s
# EXCLUDE_TESTS="ActiveRecord ApacheConnector CppParser CppUnit Crypto Data Data/PostgreSQL Data/MySQL Data/SQLite Encodings Foundation JSON JWT MongoDB Net NetSSL_OpenSSL NetSSL_Win PDF PageCompiler PocoDoc ProGen Prometheus Redis SevenZip Util XML Zip"
# ./ci/runtests.sh

linux-test-postgres:
runs-on: ubuntu-22.04
Expand Down
10 changes: 5 additions & 5 deletions Data/ODBC/testsuite/src/ODBCMySQLTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ using Poco::Tuple;
using Poco::NotFoundException;


#define MYSQL_ODBC_DRIVER "MySQL ODBC 5.3 Unicode Driver"
#define MYSQL_ODBC_DRIVER "MySQL ODBC 8.2 Unicode Driver"
#define MYSQL_DSN "PocoDataMySQLTest"
#define MYSQL_SERVER POCO_ODBC_TEST_DATABASE_SERVER
#define MYSQL_DB "test"
#define MYSQL_UID "root"
#define MYSQL_PWD "poco"
#define MYSQL_DB "test"
#define MYSQL_DB "pocotest"
#define MYSQL_UID "pocotest"
#define MYSQL_PWD "pocotest"
#define MYSQL_DB "pocotest"


ODBCTest::SessionPtr ODBCMySQLTest::_pSession;
Expand Down

0 comments on commit 0b7bbf3

Please sign in to comment.