Skip to content

Commit 353d7d6

Browse files
committed
Remove unnecessary changes
1 parent 22862e9 commit 353d7d6

2 files changed

Lines changed: 5 additions & 40 deletions

File tree

internal/container/start_test.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"context"
66
"errors"
77
"io"
8-
"strings"
98
"testing"
109

1110
"github.com/localstack/lstk/internal/log"
@@ -54,37 +53,3 @@ func TestEmitPostStartPointers_WithoutWebApp(t *testing.T) {
5453
assert.Contains(t, got, "> Tip:")
5554
}
5655

57-
func TestServicePortRange_ReturnsExpectedPorts(t *testing.T) {
58-
ports := servicePortRange()
59-
60-
require.Len(t, ports, 51)
61-
assert.Equal(t, "443", ports[0].ContainerPort)
62-
assert.Equal(t, "443", ports[0].HostPort)
63-
assert.Equal(t, "4510", ports[1].ContainerPort)
64-
assert.Equal(t, "4510", ports[1].HostPort)
65-
assert.Equal(t, "4559", ports[50].ContainerPort)
66-
assert.Equal(t, "4559", ports[50].HostPort)
67-
}
68-
69-
func TestFilterHostEnv(t *testing.T) {
70-
tests := []struct {
71-
name string
72-
env string
73-
expected bool
74-
}{
75-
{"CI is included", "CI=true", true},
76-
{"LOCALSTACK_DISABLE_EVENTS is included", "LOCALSTACK_DISABLE_EVENTS=1", true},
77-
{"LOCALSTACK_HOST is included", "LOCALSTACK_HOST=0.0.0.0", true},
78-
{"LOCALSTACK_AUTH_TOKEN is excluded", "LOCALSTACK_AUTH_TOKEN=secret", false},
79-
{"PATH is excluded", "PATH=/usr/bin", false},
80-
{"HOME is excluded", "HOME=/root", false},
81-
{"LOCALSTACK_BUILD_VERSION is included", "LOCALSTACK_BUILD_VERSION=3.0.0", true},
82-
}
83-
84-
for _, tt := range tests {
85-
t.Run(tt.name, func(t *testing.T) {
86-
got := strings.HasPrefix(tt.env, "CI=") || (strings.HasPrefix(tt.env, "LOCALSTACK_") && !strings.HasPrefix(tt.env, "LOCALSTACK_AUTH_TOKEN="))
87-
assert.Equal(t, tt.expected, got)
88-
})
89-
}
90-
}

test/integration/start_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ func TestStartCommandPassesCIAndLocalStackEnvVars(t *testing.T) {
233233
cleanup()
234234
t.Cleanup(cleanup)
235235

236-
t.Setenv("CI", "true")
237-
t.Setenv("LOCALSTACK_DISABLE_EVENTS", "1")
238-
t.Setenv("LOCALSTACK_AUTH_TOKEN", "host-token")
239-
240236
mockServer := createMockLicenseServer(true)
241237
defer mockServer.Close()
242238

243239
ctx := testContext(t)
244-
_, stderr, err := runLstk(t, ctx, "", env.With(env.APIEndpoint, mockServer.URL), "start")
240+
_, stderr, err := runLstk(t, ctx, "", env.With(env.APIEndpoint, mockServer.URL).
241+
With(env.CI, "true").
242+
With(env.DisableEvents, "1").
243+
With(env.AuthToken, "host-token"),
244+
"start")
245245
require.NoError(t, err, "lstk start failed: %s", stderr)
246246
requireExitCode(t, 0, err)
247247

0 commit comments

Comments
 (0)