File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
tests/Dapper.Tests/Providers Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 37
37
env :
38
38
MYSQL_ROOT_PASSWORD : root
39
39
MYSQL_DATABASE : test
40
+ mariadb :
41
+ image : mariadb
42
+ ports :
43
+ - 3307:3306/tcp
44
+ env :
45
+ MARIADB_ROOT_PASSWORD : root
46
+ MARIADB_DATABASE : test
47
+ options : --health-cmd "healthcheck.sh --connect --innodb_initialized" --health-interval 10s --health-timeout 5s --health-retries 5
40
48
steps :
41
49
- name : Checkout code
42
50
uses : actions/checkout@v1
49
57
OLEDBConnectionString : Provider=SQLOLEDB;Server=tcp:localhost,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=Password.;
50
58
PostgesConnectionString : Server=localhost;Port=${{ job.services.postgres.ports[5432] }};Database=test;User Id=postgres;Password=postgres;
51
59
SqlServerConnectionString : Server=tcp:localhost,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=Password.;
60
+ MariaDBConnectionString : Server=localhost;Port=${{ job.services.mariadb.ports[3306] }};Uid=root;Pwd=root;Database=test;Allow User Variables=true
52
61
- name : .NET Lib Pack
53
62
run : dotnet pack Build.csproj --no-build -c Release /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
Original file line number Diff line number Diff line change
1
+ namespace Dapper . Tests
2
+ {
3
+ /// <summary>
4
+ /// If Docker Desktop is installed, run the following command to start a container suitable for the tests.
5
+ /// <code>
6
+ /// docker run -d -p 3306:3306 --name Dapper.Tests.MariaDB -e MARIADB_DATABASE=tests -e MARIADB_USER=test -e MARIADB_PASSWORD=pass -e MARIADB_ROOT_PASSWORD=pass mariadb
7
+ /// </code>
8
+ /// </summary>
9
+ public sealed class MariaDBProvider : MySqlProvider
10
+ {
11
+ public override string GetConnectionString ( ) =>
12
+ GetConnectionString ( "MariaDBConnectionString" , "Server=localhost;Database=tests;Uid=test;Pwd=pass;" ) ;
13
+ }
14
+ }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ namespace Dapper.Tests
13
13
/// docker run -d -p 3306:3306 --name Dapper.Tests.MySQL -e MYSQL_DATABASE=tests -e MYSQL_USER=test -e MYSQL_PASSWORD=pass -e MYSQL_ROOT_PASSWORD=pass mysql
14
14
/// </code>
15
15
/// </summary>
16
- public sealed class MySqlProvider : DatabaseProvider
16
+ public class MySqlProvider : DatabaseProvider
17
17
{
18
18
public override DbProviderFactory Factory => MySqlConnector . MySqlConnectorFactory . Instance ;
19
19
public override string GetConnectionString ( ) =>
You can’t perform that action at this time.
0 commit comments