Skip to content

Commit bcc6b65

Browse files
committed
chore(localstack): using testcontainers.Container.Host instead of direct relying on testcontainers.DockerProvider in tests.
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
1 parent 37f5ee0 commit bcc6b65

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

modules/localstack/v1/s3_test.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ func awsSession(ctx context.Context, l *localstack.LocalStackContainer) (*sessio
3535
return &session.Session{}, err
3636
}
3737

38-
provider, err := testcontainers.NewDockerProvider()
39-
if err != nil {
40-
return &session.Session{}, err
41-
}
42-
defer provider.Close()
43-
44-
host, err := provider.DaemonHost(ctx)
38+
host, err := l.Host(ctx)
4539
if err != nil {
4640
return &session.Session{}, err
4741
}

modules/localstack/v2/s3_test.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,7 @@ func s3Client(ctx context.Context, l *localstack.LocalStackContainer) (*s3.Clien
4646
return nil, err
4747
}
4848

49-
provider, err := testcontainers.NewDockerProvider()
50-
if err != nil {
51-
return nil, err
52-
}
53-
defer provider.Close()
54-
55-
host, err := provider.DaemonHost(ctx)
49+
host, err := l.Host(ctx)
5650
if err != nil {
5751
return nil, err
5852
}

0 commit comments

Comments
 (0)