Skip to content

Commit

Permalink
fix: fixes test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Sep 10, 2024
1 parent d37b7ff commit e196385
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions forge/cli/pkg/earthly/earthly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func TestEarthlyExecutor_buildArguments(t *testing.T) {
testutils.NewNoopLogger(),
),
platform: getNativePlatform(),
expect: []string{"/test/dir+foo"},
expect: []string{"--platform", getNativePlatform(), "/test/dir+foo"},
},
{
name: "with platform",
Expand All @@ -146,7 +146,7 @@ func TestEarthlyExecutor_buildArguments(t *testing.T) {
WithTargetArgs("--arg1", "foo", "--arg2", "bar"),
),
platform: getNativePlatform(),
expect: []string{"/test/dir+foo", "--arg1", "foo", "--arg2", "bar"},
expect: []string{"--platform", getNativePlatform(), "/test/dir+foo", "--arg1", "foo", "--arg2", "bar"},
},
{
name: "with artifact",
Expand All @@ -155,7 +155,7 @@ func TestEarthlyExecutor_buildArguments(t *testing.T) {
WithArtifact("test"),
),
platform: getNativePlatform(),
expect: []string{"--artifact", "/test/dir+foo/*", "test/"},
expect: []string{"--platform", getNativePlatform(), "--artifact", "/test/dir+foo/*", "test/"},
},
{
name: "with artifact and platforms",
Expand All @@ -167,23 +167,14 @@ func TestEarthlyExecutor_buildArguments(t *testing.T) {
platform: "foo",
expect: []string{"--platform", "foo", "--artifact", "/test/dir+foo/*", "test/foo/"},
},
{
name: "with ci",
e: NewEarthlyExecutor("/test/dir", "foo", nil, secrets.SecretStore{},
testutils.NewNoopLogger(),
WithCI(),
),
platform: getNativePlatform(),
expect: []string{"--ci", "/test/dir+foo"},
},
{
name: "with privileged",
e: NewEarthlyExecutor("/test/dir", "foo", nil, secrets.SecretStore{},
testutils.NewNoopLogger(),
WithPrivileged(),
),
platform: getNativePlatform(),
expect: []string{"--allow-privileged", "/test/dir+foo"},
expect: []string{"--platform", getNativePlatform(), "--allow-privileged", "/test/dir+foo"},
},
{
name: "with satellite",
Expand All @@ -192,7 +183,7 @@ func TestEarthlyExecutor_buildArguments(t *testing.T) {
WithSatellite("satellite"),
),
platform: getNativePlatform(),
expect: []string{"--sat", "satellite", "/test/dir+foo"},
expect: []string{"--platform", getNativePlatform(), "--sat", "satellite", "/test/dir+foo"},
},
}

Expand Down

0 comments on commit e196385

Please sign in to comment.