From 6695561314971243c56992b993442f9ae4867a42 Mon Sep 17 00:00:00 2001 From: Ryan VanGundy Date: Sat, 22 Feb 2025 17:51:05 -0500 Subject: [PATCH] Fix localstack pro image --- pkg/services/localstack_service.go | 8 ++------ pkg/services/localstack_service_test.go | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/services/localstack_service.go b/pkg/services/localstack_service.go index 484b0f979..116933401 100644 --- a/pkg/services/localstack_service.go +++ b/pkg/services/localstack_service.go @@ -70,13 +70,9 @@ func (s *LocalstackService) GetComposeConfig() (*types.Config, error) { }, } - // If the localstack auth token is set, add it to the secrets + // If the localstack auth token is set, add it to the environment if localstackAuthToken != "" { - services[0].Secrets = []types.ServiceSecretConfig{ - { - Source: "LOCALSTACK_AUTH_TOKEN", - }, - } + services[0].Environment["LOCALSTACK_AUTH_TOKEN"] = ptrString("${LOCALSTACK_AUTH_TOKEN}") } return &types.Config{Services: services}, nil diff --git a/pkg/services/localstack_service_test.go b/pkg/services/localstack_service_test.go index 63548b0f1..cdb38e967 100644 --- a/pkg/services/localstack_service_test.go +++ b/pkg/services/localstack_service_test.go @@ -146,8 +146,8 @@ func TestLocalstackService_GetComposeConfig(t *testing.T) { } service := composeConfig.Services[0] - if len(service.Secrets) == 0 || service.Secrets[0].Source != "LOCALSTACK_AUTH_TOKEN" { - t.Errorf("expected service to have LOCALSTACK_AUTH_TOKEN secret, got %v", service.Secrets) + if service.Environment["LOCALSTACK_AUTH_TOKEN"] == nil || *service.Environment["LOCALSTACK_AUTH_TOKEN"] != "${LOCALSTACK_AUTH_TOKEN}" { + t.Errorf("expected service to have LOCALSTACK_AUTH_TOKEN environment variable, got %v", service.Environment["LOCALSTACK_AUTH_TOKEN"]) } }) }