Skip to content

Commit 1da8f7e

Browse files
authored
ci: allow empty MySQL password (#91)
老大哥go那边的测试mysql的密码是空的,本地频繁项目的集成伤神,调整成跟go那边一样。
1 parent ba8f9f7 commit 1da8f7e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/build_and_it.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
--health-interval=10s
2525
--health-timeout=5s
2626
--health-retries=3
27-
-e MYSQL_ROOT_PASSWORD=123456
27+
-e MYSQL_ALLOW_EMPTY_PASSWORD=1
2828
--entrypoint sh mysql:8.0 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
2929
strategy:
3030
matrix:
@@ -43,8 +43,8 @@ jobs:
4343
dotnet --list-runtimes
4444
- name: Create database
4545
run: |
46-
mysql -h127.0.0.1 -uroot -p123456 < /home/runner/work/client-csharp/client-csharp/sqls/barrier.mysql.sql
47-
mysql -h127.0.0.1 -uroot -p123456 < /home/runner/work/client-csharp/client-csharp/sqls/busi.mysql.sql
46+
mysql -h127.0.0.1 -uroot < /home/runner/work/client-csharp/client-csharp/sqls/barrier.mysql.sql
47+
mysql -h127.0.0.1 -uroot < /home/runner/work/client-csharp/client-csharp/sqls/busi.mysql.sql
4848
- name: Setup DTM server
4949
run: |
5050
wget https://github.com/dtm-labs/dtm/releases/download/v1.18.0/dtm_1.18.0_linux_amd64.tar.gz

samples/DtmOnDaprSample/appsettings.docker.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"AppSettings": {
1313
"DtmUrl": "http://dtm:36789",
1414
"BusiUrl": "http://sample:9090/api",
15-
"BarrierConn": "Server=db;port=3306;User ID=root;Password=123456;Database=dtm_barrier",
15+
"BarrierConn": "Server=db;port=3306;User ID=root;Password=;Database=dtm_barrier",
1616
"MongoBarrierConn": "mongodb://mgdb:27017"
1717
}
1818
}

samples/DtmSample/appsettings.docker.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"DtmUrl": "http://dtm:36789",
1414
"DtmGrpcUrl": "http://dtm:36790",
1515
"BusiUrl": "http://sample:9090/api",
16-
"BarrierConn": "Server=db;port=3306;User ID=root;Password=123456;Database=dtm_barrier",
16+
"BarrierConn": "Server=db;port=3306;User ID=root;Password=;Database=dtm_barrier",
1717
"MongoBarrierConn": "mongodb://mgdb:27017"
1818
}
1919
}

tests/BusiGrpcService/Services/BusiApiService.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ await barrier.Call(conn, async (tx) =>
279279
return new Empty();
280280
}
281281

282-
private MySqlConnection GetBarrierConn() => new("Server=localhost;port=3306;User ID=root;Password=123456;Database=dtm_barrier");
282+
private MySqlConnection GetBarrierConn() => new("Server=localhost;port=3306;User ID=root;Password=;Database=dtm_barrier");
283283

284284
private async Task<StackExchange.Redis.IDatabase> GetRedis()
285285
{

tests/Dtmgrpc.IntegrationTests/MsgGrpcTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ await branchBarrier.Call(conn, () =>
111111

112112
private static readonly int TransInUID = 2;
113113

114-
private MySqlConnection getBarrierMySqlConnection() => new("Server=localhost;port=3306;User ID=root;Password=123456;Database=dtm_barrier");
114+
private MySqlConnection getBarrierMySqlConnection() => new("Server=localhost;port=3306;User ID=root;Password=;Database=dtm_barrier");
115115

116116
private async Task LocalAdjustBalance(DbConnection conn, int uid, long amount, string result)
117117
{

0 commit comments

Comments
 (0)