diff --git a/pkg/runner/action_test.go b/pkg/runner/action_test.go index 36ee14f73b6..5f6ba52e542 100644 --- a/pkg/runner/action_test.go +++ b/pkg/runner/action_test.go @@ -2,6 +2,7 @@ package runner import ( "context" + "fmt" "io" "io/fs" "strings" @@ -224,8 +225,10 @@ func TestActionRunner(t *testing.T) { t.Run(tt.name, func(t *testing.T) { ctx := context.Background() + actionDir := fmt.Sprintf("%s/dir", tt.step.getRunContext().ActionCacheDir()) + cm := &containerMock{} - cm.On("CopyDir", "/var/run/act/actions/dir/", "dir/", false).Return(func(ctx context.Context) error { return nil }) + cm.On("CopyDir", "/var/run/act/actions/dir/", actionDir+"/", false).Return(func(ctx context.Context) error { return nil }) envMatcher := mock.MatchedBy(func(env map[string]string) bool { for k, v := range tt.expectedEnv { @@ -240,7 +243,7 @@ func TestActionRunner(t *testing.T) { tt.step.getRunContext().JobContainer = cm - err := runActionImpl(tt.step, "dir", newRemoteAction("org/repo/path@ref"))(ctx) + err := runActionImpl(tt.step, actionDir, newRemoteAction("org/repo/path@ref"))(ctx) assert.Nil(t, err) cm.AssertExpectations(t)