Skip to content

Commit

Permalink
some feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
  • Loading branch information
ludfjig committed Aug 7, 2023
1 parent b309a26 commit f05b076
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/exec/builder/execute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package builder

import (
"context"
"fmt"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -145,9 +144,9 @@ func TestExecuteStep_HasOrderedArguments(t *testing.T) {
}

func TestExecuteStep_SpecifiesCustomWorkingDirectory(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip() // pwd not available on windows (for some reason the only command that works is "help" ?!?)
}
//if runtime.GOOS == "windows" {
// t.Skip() // pwd not available on windows (for some reason the only command that works is "help" ?!?)
//}

ctx := context.Background()
c := porterruntime.NewTestRuntimeConfig(t)
Expand All @@ -163,8 +162,13 @@ func TestExecuteStep_SpecifiesCustomWorkingDirectory(t *testing.T) {
SuffixArguments: []string{},
}

if runtime.GOOS == "windows" {
step.TestStep.Command = "cmd.exe"
step.Arguments = []string{"/c", "cd"}
}

_, err := ExecuteStep(ctx, c.RuntimeConfig, step)
assert.Equal(t, fmt.Sprintln(wd), c.TestContext.GetOutput())
assert.Equal(t, wd, strings.TrimRight(c.TestContext.GetOutput(), "\r\n"))
require.NoError(t, err, "Execute Step failed")
}

Expand Down

0 comments on commit f05b076

Please sign in to comment.