Skip to content

Commit

Permalink
adjust Test_execCmdWithTmp to be less demanding and compat with GH ac…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
umputun committed Jul 16, 2023
1 parent 955b9e9 commit 80a8d6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/runner/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ func Test_execCmdWithTmp(t *testing.T) {
}
resp, err = ec.Script(ctx)
require.Error(t, err)
assert.Contains(t, wr.String(), fmt.Sprintf("ls: cannot access '%s': No such file or directory", tmpPath))
assert.Contains(t, wr.String(), fmt.Sprintf("ls: cannot access '%s'", tmpPath))
})

t.Run("copy a single file with sudo", func(t *testing.T) {
Expand Down Expand Up @@ -481,7 +481,7 @@ func Test_execCmdWithTmp(t *testing.T) {
}
resp, err = ec.Script(ctx)
require.Error(t, err)
assert.Contains(t, wr.String(), fmt.Sprintf("ls: cannot access '%s': No such file or directory", tmpPath))
assert.Contains(t, wr.String(), fmt.Sprintf("ls: cannot access '%s'", tmpPath))
})

t.Run("copy multiple files with sudo", func(t *testing.T) {
Expand Down Expand Up @@ -520,6 +520,6 @@ func Test_execCmdWithTmp(t *testing.T) {
}
resp, err = ec.Script(ctx)
require.Error(t, err)
assert.Contains(t, wr.String(), fmt.Sprintf("ls: cannot access '%s': No such file or directory", tmpPath))
assert.Contains(t, wr.String(), fmt.Sprintf("ls: cannot access '%s'", tmpPath))
})
}

0 comments on commit 80a8d6f

Please sign in to comment.