Skip to content

Commit

Permalink
fix: always disable Ryuk
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin committed Feb 28, 2024
1 parent 557177b commit 686d227
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions internal/testutil/localstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ package testutil
import (
"context"
"fmt"
"os"

dockercontainer "github.com/docker/docker/api/types/container"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/modules/localstack"
)

func SetupLocalStack(ctx context.Context, version string) (*localstack.LocalStackContainer, string, error) {

if err := os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true"); err != nil {
return nil, "", err
}

container, err := localstack.RunContainer(ctx, testcontainers.CustomizeRequest(
testcontainers.GenericContainerRequest{
ContainerRequest: testcontainers.ContainerRequest{
Expand Down
6 changes: 0 additions & 6 deletions magefiles/terraformplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ const (
)

func fixtureTerraformPlanSnapshots(ctx context.Context) error {

if err := os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true"); err != nil {
return err
}

localstackC, addr, err := testutil.SetupLocalStack(ctx, "3.1.0")
if err != nil {
return err
Expand Down Expand Up @@ -100,7 +95,6 @@ func fixtureTerraformPlanSnapshots(ctx context.Context) error {
}

return g.Wait()

}

func generatePlan(ctx context.Context, execPath, workingDir string) error {
Expand Down

0 comments on commit 686d227

Please sign in to comment.