Skip to content

Commit f6d346d

Browse files
committed
test: fix ordering issue
1 parent b99eadf commit f6d346d

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

cmd/porch/run/run_integration_test.go

Lines changed: 0 additions & 4 deletions
This file was deleted.

internal/commands/copycwdtotemp/copyCwdToTemp_integration_test.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ import (
1616

1717
// TestCopyCwdToTempWithNewCwd tests the CopyCwdToTemp command with a new working directory.
1818
func TestCopyCwdToTempWithNewCwd(t *testing.T) {
19-
requiredTree := `.
20-
./subdir
21-
./subdir/test2.txt
22-
./test.txt`
19+
requiredTree := []string{
20+
"./subdir",
21+
"./subdir/test2.txt",
22+
"./test.txt",
23+
}
2324
cwd, _ := os.Getwd()
2425
path := path.Join(cwd, "testdata/copyCwdToTemp")
2526
base := &runbatch.BaseCommand{
@@ -59,5 +60,7 @@ func TestCopyCwdToTempWithNewCwd(t *testing.T) {
5960
require.NoError(t, results[0].Error)
6061
assert.Len(t, results[0].Children, 3)
6162
assert.NotEqual(t, path, string(results[0].Children[1].StdOut))
62-
assert.Contains(t, string(results[0].Children[2].StdOut), requiredTree)
63+
for _, line := range requiredTree {
64+
assert.Contains(t, string(results[0].Children[2].StdOut), line)
65+
}
6366
}

0 commit comments

Comments
 (0)