Skip to content

Commit b52f567

Browse files
chore(deps): bump the go-minor-and-patch group across 1 directory with 35 updates (#3249)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Miguel Martinez Trivino <miguel@chainloop.dev>
1 parent a846248 commit b52f567

6 files changed

Lines changed: 280 additions & 279 deletions

File tree

app/controlplane/pkg/biz/testhelpers/database.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import (
3838
backendsm "github.com/chainloop-dev/chainloop/pkg/blobmanager/mocks"
3939
"github.com/chainloop-dev/chainloop/pkg/credentials"
4040
creds "github.com/chainloop-dev/chainloop/pkg/credentials/mocks"
41-
"github.com/docker/go-connections/nat"
4241
"github.com/go-kratos/kratos/v2/log"
42+
"github.com/moby/moby/api/types/network"
4343
"github.com/stretchr/testify/assert"
4444
"github.com/stretchr/testify/require"
4545

@@ -167,7 +167,7 @@ func NewTestDatabase(t *testing.T) *TestDatabase {
167167
defer cancel()
168168

169169
const port = "5432/tcp"
170-
dbURL := func(host string, port nat.Port) string {
170+
dbURL := func(host string, port network.Port) string {
171171
return fmt.Sprintf("postgres://postgres:postgres@%s:%s/postgres?sslmode=disable", host, port.Port())
172172
}
173173

@@ -180,7 +180,7 @@ func NewTestDatabase(t *testing.T) *TestDatabase {
180180
"POSTGRES_PASSWORD": "postgres",
181181
"POSTGRES_DB": "controlplane_test",
182182
},
183-
WaitingFor: wait.ForSQL(nat.Port(port), "postgres", dbURL).WithStartupTimeout(time.Second * 5),
183+
WaitingFor: wait.ForSQL(port, "postgres", dbURL).WithStartupTimeout(time.Second * 5),
184184
}
185185

186186
postgres, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
@@ -198,7 +198,7 @@ func (db *TestDatabase) Port(t *testing.T) int {
198198
defer cancel()
199199
p, err := db.instance.MappedPort(ctx, "5432")
200200
require.NoError(t, err)
201-
return p.Int()
201+
return int(p.Num())
202202
}
203203

204204
func (db *TestDatabase) ConnectionString(t *testing.T) string {

0 commit comments

Comments
 (0)