From 56344473370ad92b9b93804a83faea789cba47c0 Mon Sep 17 00:00:00 2001 From: Ben Vercammen Date: Tue, 21 Mar 2023 20:36:51 +0100 Subject: [PATCH] test: added possibility to use MySQL server without SSL (for localhost testing purposes) --- packages/orm/angel_orm_mysql/test/common.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/orm/angel_orm_mysql/test/common.dart b/packages/orm/angel_orm_mysql/test/common.dart index 00c5230c..3da3be16 100644 --- a/packages/orm/angel_orm_mysql/test/common.dart +++ b/packages/orm/angel_orm_mysql/test/common.dart @@ -84,6 +84,8 @@ Future _connectToMariaDb(List schemas) async { } // Executor for MySQL +// create user 'test'@'localhost' identified by 'test123'; +// GRANT ALL PRIVILEGES ON orm_test.* to 'test'@'localhost' WITH GRANT OPTION; Future _connectToMySql(List schemas) async { var connection = await MySQLConnection.createConnection( databaseName: 'orm_test', @@ -91,7 +93,7 @@ Future _connectToMySql(List schemas) async { host: "localhost", userName: Platform.environment['MYSQL_USERNAME'] ?? 'test', password: Platform.environment['MYSQL_PASSWORD'] ?? 'test123', - secure: true); + secure: !('false' == Platform.environment['MYSQL_SECURE'])); await connection.connect(timeoutMs: 10000);