@@ -29,8 +29,8 @@ func TestJdbcVerified(t *testing.T) {
2929 postgresUser := gofakeit .Username ()
3030 postgresPass := gofakeit .Password (true , true , true , false , false , 10 )
3131 postgresDB := gofakeit .Word ()
32- postgresContainer , err := postgres .RunContainer (ctx ,
33- testcontainers . WithImage ( "postgres:13-alpine" ) ,
32+ postgresContainer , err := postgres .Run (ctx ,
33+ "postgres:13-alpine" ,
3434 postgres .WithDatabase (postgresDB ),
3535 postgres .WithUsername (postgresUser ),
3636 postgres .WithPassword (postgresPass ),
@@ -56,8 +56,8 @@ func TestJdbcVerified(t *testing.T) {
5656 mysqlUser := gofakeit .Username ()
5757 mysqlPass := gofakeit .Password (true , true , true , false , false , 10 )
5858 mysqlDatabase := gofakeit .Word ()
59- mysqlC , err := mysql .RunContainer (ctx ,
60- mysql . WithDatabase ( mysqlDatabase ) ,
59+ mysqlC , err := mysql .Run (ctx ,
60+ " mysql:8.0.36" ,
6161 mysql .WithUsername (mysqlUser ),
6262 mysql .WithPassword (mysqlPass ),
6363 )
@@ -79,8 +79,8 @@ func TestJdbcVerified(t *testing.T) {
7979 sqlServerPass := gofakeit .Password (true , true , true , false , false , 10 )
8080 sqlServerDatabase := "master"
8181
82- mssqlContainer , err := mssql .RunContainer (ctx ,
83- testcontainers . WithImage ( "mcr.microsoft.com/azure-sql-edge" ) ,
82+ mssqlContainer , err := mssql .Run (ctx ,
83+ "mcr.microsoft.com/azure-sql-edge" ,
8484 mssql .WithAcceptEULA (),
8585 mssql .WithPassword (sqlServerPass ),
8686 )
@@ -125,6 +125,10 @@ func TestJdbcVerified(t *testing.T) {
125125 Verified : true ,
126126 Redacted : fmt .Sprintf ("jdbc:postgresql://%s:%s/%s?sslmode=disable&password=%s&user=%s" ,
127127 postgresHost , postgresPort .Port (), postgresDB , strings .Repeat ("*" , len (postgresPass )), postgresUser ),
128+ AnalysisInfo : map [string ]string {
129+ "connection_string" : fmt .Sprintf ("jdbc:postgresql://%s:%s/%s?sslmode=disable&password=%s&user=%s" ,
130+ postgresHost , postgresPort .Port (), postgresDB , postgresPass , postgresUser ),
131+ },
128132 },
129133 },
130134 wantErr : false ,
@@ -143,6 +147,10 @@ func TestJdbcVerified(t *testing.T) {
143147 Verified : true ,
144148 Redacted : fmt .Sprintf (`jdbc:mysql://%s:%s@tcp(%s:%s)/%s` ,
145149 mysqlUser , strings .Repeat ("*" , len (mysqlPass )), mysqlHost , mysqlPort .Port (), mysqlDatabase ),
150+ AnalysisInfo : map [string ]string {
151+ "connection_string" : fmt .Sprintf (`jdbc:mysql://%s:%s@tcp(%s:%s)/%s` ,
152+ mysqlUser , mysqlPass , mysqlHost , mysqlPort .Port (), mysqlDatabase ),
153+ },
146154 },
147155 },
148156 wantErr : false ,
@@ -161,6 +169,10 @@ func TestJdbcVerified(t *testing.T) {
161169 Verified : true ,
162170 Redacted : fmt .Sprintf ("jdbc:sqlserver://odbc:server=%s;port=%s;database=%s;password=%s" ,
163171 sqlServerHost , sqlServerPort .Port (), sqlServerDatabase , strings .Repeat ("*" , len (sqlServerPass ))),
172+ AnalysisInfo : map [string ]string {
173+ "connection_string" : fmt .Sprintf ("jdbc:sqlserver://odbc:server=%s;port=%s;database=%s;password=%s" ,
174+ sqlServerHost , sqlServerPort .Port (), sqlServerDatabase , sqlServerPass ),
175+ },
164176 },
165177 },
166178 wantErr : false ,
0 commit comments