Skip to content

Commit

Permalink
Upd testcontainers to latest in integr test
Browse files Browse the repository at this point in the history
  • Loading branch information
l0kix2 committed Jun 10, 2024
1 parent b4a140f commit 5656431
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"github.com/tractoai/testcontainers-ytsaurus"
ytcontainer "github.com/tractoai/testcontainers-ytsaurus"
)

const (
Expand All @@ -24,18 +24,20 @@ func TestAppIntegration(t *testing.T) {
cfg, err := loadConfig("config.local.yaml")
require.NoError(t, err)

ytLocal := ytcontainer.NewYtsaurusLocal()
ctx := context.Background()
var ytLocal *ytcontainer.YTsaurusContainer
if runLocalYtsaurus {
defer func() { require.NoError(t, ytLocal.Stop()) }()
require.NoError(t, ytLocal.Start())
ytLocal, err = ytcontainer.RunContainer(ctx)
require.NoError(t, err)
defer func() { require.NoError(t, ytLocal.Terminate(ctx)) }()
}

logger, err := configureLogger(&cfg.Logging)
require.NoError(t, err)
app, err := NewApp(cfg, logger)
require.NoError(t, err)

ytClient, err := ytLocal.GetClient()
ytClient, err := ytLocal.NewClient(ctx)

usersBefore, err := doGetAllYtsaurusUsers(context.Background(), ytClient, cfg.Ytsaurus.SourceAttributeName)
require.NoError(t, err)
Expand Down

0 comments on commit 5656431

Please sign in to comment.