Skip to content

Commit 3db5ca9

Browse files
committed
update test to match how method is actually called
1 parent 6ff9851 commit 3db5ca9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/runner/action_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package runner
22

33
import (
44
"context"
5+
"fmt"
56
"io"
67
"io/fs"
78
"strings"
@@ -224,8 +225,10 @@ func TestActionRunner(t *testing.T) {
224225
t.Run(tt.name, func(t *testing.T) {
225226
ctx := context.Background()
226227

228+
actionDir := fmt.Sprintf("%s/dir", tt.step.getRunContext().ActionCacheDir())
229+
227230
cm := &containerMock{}
228-
cm.On("CopyDir", "/var/run/act/actions/dir/", "dir/", false).Return(func(ctx context.Context) error { return nil })
231+
cm.On("CopyDir", "/var/run/act/actions/dir/", actionDir+"/", false).Return(func(ctx context.Context) error { return nil })
229232

230233
envMatcher := mock.MatchedBy(func(env map[string]string) bool {
231234
for k, v := range tt.expectedEnv {
@@ -240,7 +243,7 @@ func TestActionRunner(t *testing.T) {
240243

241244
tt.step.getRunContext().JobContainer = cm
242245

243-
err := runActionImpl(tt.step, "dir", newRemoteAction("org/repo/path@ref"))(ctx)
246+
err := runActionImpl(tt.step, actionDir, newRemoteAction("org/repo/path@ref"))(ctx)
244247

245248
assert.Nil(t, err)
246249
cm.AssertExpectations(t)

0 commit comments

Comments
 (0)