From b8390e2c9ac92e10dbaa6412909670c6a6aef170 Mon Sep 17 00:00:00 2001 From: Dale Hui Date: Sat, 12 Jan 2019 01:45:27 -0800 Subject: [PATCH] Update dktest --- go.mod | 13 ++++++-- go.sum | 32 ++++++++++++++++--- savepointers/mssql/mssql_test.go | 11 +++++-- savepointers/mysql/mysql_test.go | 11 +++++-- savepointers/postgres/postgres_test.go | 11 +++++-- .../savepointertest/savepointertest.go | 12 ++++--- 6 files changed, 70 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 2276d4b..333f5db 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,22 @@ module github.com/dhui/satomic require ( + cloud.google.com/go v0.34.0 // indirect github.com/DATA-DOG/go-sqlmock v1.3.0 github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f github.com/dhui/dhrand v0.1.0 - github.com/dhui/dktest v0.1.0 + github.com/dhui/dktest v0.3.0 github.com/go-sql-driver/mysql v1.4.1 github.com/jmoiron/sqlx v1.2.0 github.com/lib/pq v1.0.0 github.com/mattn/go-sqlite3 v1.10.0 - google.golang.org/appengine v1.3.0 // indirect + github.com/pkg/errors v0.8.1 // indirect + github.com/sirupsen/logrus v1.3.0 // indirect + github.com/stretchr/testify v1.3.0 // indirect + golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc // indirect + golang.org/x/net v0.0.0-20190110200230-915654e7eabc // indirect + golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect + golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb // indirect + google.golang.org/appengine v1.4.0 // indirect + google.golang.org/genproto v0.0.0-20190111180523-db91494dd46c // indirect ) diff --git a/go.sum b/go.sum index 71f949a..eb670ea 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/DATA-DOG/go-sqlmock v1.3.0 h1:ljjRxlddjfChBJdFKJs5LuCwCWPLaC1UZLwAo3PBBMk= @@ -9,14 +11,15 @@ github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcy github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f h1:WH0w/R4Yoey+04HhFxqZ6VX6I0d7RMyw5aXQ9UTvQPs= github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= github.com/dhui/dhrand v0.1.0 h1:C8ES1tf4bO37VmLmjdcOR03nYVQDJuF26mMyUITz4NY= github.com/dhui/dhrand v0.1.0/go.mod h1:tK3W7Gn/9L6SqpDX5QmS0gX55BjYjUZbJsavMWxj5A0= -github.com/dhui/dktest v0.1.0 h1:XeZFhKJ8CnpI9yfNIOsz/jvOcqQ/M/Qy/X3KZ5Wa0GI= -github.com/dhui/dktest v0.1.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= +github.com/dhui/dktest v0.3.0 h1:kwX5a7EkLcjo7VpsPQSYJcKGbXBXdjI9FGjuUj1jn6I= +github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= github.com/docker/distribution v2.7.0+incompatible h1:neUDAlf3wX6Ml4HdqTrbcOHXtfRN0TFIwt6YFL7N9RU= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b h1:Y0C03XhDDcak1Ow6em58mBJmUJjxaMfB5sFttITXE0Q= @@ -33,6 +36,7 @@ github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -59,37 +63,57 @@ github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVo github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc h1:F5tKCVGp+MUAHhKp5MZtGqAlGX3+oCsiL1Q629FL90M= +golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190110200230-915654e7eabc h1:Yx9JGxI1SBhVLFjpAkWMaO1TF+xyqtHLjZpvQboJGiM= +golang.org/x/net v0.0.0-20190110200230-915654e7eabc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 h1:S8GOgffXV1X3fpVG442QRfWOt0iFl79eHJ7OPt725bo= golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb h1:1w588/yEchbPNpa9sEvOcMZYbWHedwJjg4VOAdDHWHk= +golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190111180523-db91494dd46c h1:LZllHYjdJnynBfmwysp+s4yhMzfc+3BzhdqzAMvwjoc= +google.golang.org/genproto v0.0.0-20190111180523-db91494dd46c/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= diff --git a/savepointers/mssql/mssql_test.go b/savepointers/mssql/mssql_test.go index 54edba8..c34ab1c 100644 --- a/savepointers/mssql/mssql_test.go +++ b/savepointers/mssql/mssql_test.go @@ -1,6 +1,7 @@ package mssql_test import ( + "context" "database/sql" "fmt" "testing" @@ -29,13 +30,17 @@ var env = map[string]string{ "SA_PASSWORD": password, } -var msSQLDBGetter savepointertest.DBGetter = func(c dktest.ContainerInfo) (*sql.DB, error) { - connStr := fmt.Sprintf("sqlserver://sa:%s@%s:%s", password, c.IP, c.Port) +var msSQLDBGetter savepointertest.DBGetter = func(ctx context.Context, c dktest.ContainerInfo) (*sql.DB, error) { + ip, port, err := c.FirstPort() + if err != nil { + return nil, err + } + connStr := fmt.Sprintf("sqlserver://sa:%s@%s:%s", password, ip, port) db, err := sql.Open("sqlserver", connStr) if err != nil { return nil, err } - if err := db.Ping(); err != nil { + if err := db.PingContext(ctx); err != nil { return nil, err } return db, nil diff --git a/savepointers/mysql/mysql_test.go b/savepointers/mysql/mysql_test.go index f5028cd..daf25fe 100644 --- a/savepointers/mysql/mysql_test.go +++ b/savepointers/mysql/mysql_test.go @@ -1,6 +1,7 @@ package mysql_test import ( + "context" "database/sql" "fmt" "testing" @@ -28,13 +29,17 @@ var env = map[string]string{ "MYSQL_DATABASE": db, } -var mySQLDBGetter savepointertest.DBGetter = func(c dktest.ContainerInfo) (*sql.DB, error) { - connStr := fmt.Sprintf("root:%s@tcp(%s:%s)/%s", password, c.IP, c.Port, db) +var mySQLDBGetter savepointertest.DBGetter = func(ctx context.Context, c dktest.ContainerInfo) (*sql.DB, error) { + ip, port, err := c.FirstPort() + if err != nil { + return nil, err + } + connStr := fmt.Sprintf("root:%s@tcp(%s:%s)/%s", password, ip, port, db) db, err := sql.Open("mysql", connStr) if err != nil { return nil, err } - if err := db.Ping(); err != nil { + if err := db.PingContext(ctx); err != nil { return nil, err } return db, nil diff --git a/savepointers/postgres/postgres_test.go b/savepointers/postgres/postgres_test.go index 7e60ab4..dae5918 100644 --- a/savepointers/postgres/postgres_test.go +++ b/savepointers/postgres/postgres_test.go @@ -1,6 +1,7 @@ package postgres_test import ( + "context" "database/sql" "fmt" "testing" @@ -21,13 +22,17 @@ const ( timeout = 3 * time.Minute ) -var postgresDBGetter savepointertest.DBGetter = func(c dktest.ContainerInfo) (*sql.DB, error) { - connStr := fmt.Sprintf("host=%s port=%s user=postgres dbname=postgres sslmode=disable", c.IP, c.Port) +var postgresDBGetter savepointertest.DBGetter = func(ctx context.Context, c dktest.ContainerInfo) (*sql.DB, error) { + ip, port, err := c.FirstPort() + if err != nil { + return nil, err + } + connStr := fmt.Sprintf("host=%s port=%s user=postgres dbname=postgres sslmode=disable", ip, port) db, err := sql.Open("postgres", connStr) if err != nil { return nil, err } - if err := db.Ping(); err != nil { + if err := db.PingContext(ctx); err != nil { return nil, err } return db, nil diff --git a/savepointers/savepointertest/savepointertest.go b/savepointers/savepointertest/savepointertest.go index e4ea3f5..0980e36 100644 --- a/savepointers/savepointertest/savepointertest.go +++ b/savepointers/savepointertest/savepointertest.go @@ -1,6 +1,7 @@ package savepointertest import ( + "context" "database/sql" "fmt" "testing" @@ -17,12 +18,12 @@ import ( // DBGetter is a function that gets a ready-to-use SQL DB using the given ContainerInfo. // e.g. Ping() should be called by the DBGetter before returning the *sql.DB. // The caller is responsible for closing the DB. -type DBGetter func(dktest.ContainerInfo) (*sql.DB, error) +type DBGetter func(context.Context, dktest.ContainerInfo) (*sql.DB, error) // ReadyFunc converts the DBGetter to dktest compatible ReadyFunc -func (g DBGetter) ReadyFunc() func(dktest.ContainerInfo) bool { - return func(c dktest.ContainerInfo) bool { - db, err := g(c) +func (g DBGetter) ReadyFunc() func(context.Context, dktest.ContainerInfo) bool { + return func(ctx context.Context, c dktest.ContainerInfo) bool { + db, err := g(ctx, c) if err != nil { return false } @@ -59,13 +60,14 @@ func TestSavepointer(t *testing.T, savepointer savepointers.Savepointer, db *sql // TestSavepointerWithDocker tests the given Savepointer using the given Docker images and options func TestSavepointerWithDocker(t *testing.T, savepointer savepointers.Savepointer, imageNames []string, opts dktest.Options, dbGetter DBGetter) { + ctx := context.Background() for _, imageName := range imageNames { imageName := imageName t.Run(fmt.Sprintf("test_savepointer_%T_%s", savepointer, imageName), func(t *testing.T) { t.Parallel() dktest.Run(t, imageName, opts, func(t *testing.T, c dktest.ContainerInfo) { - db, err := dbGetter(c) + db, err := dbGetter(ctx, c) if err != nil { t.Fatal(err) }