mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-26 18:20:59 +00:00
chore(tests): differentiate 'failed to copy content' errors
2025-08-11T13:02:51.0737198Z --- FAIL: TestRunner_RunEvent (431.14s) 2025-08-11T13:02:51.0737236Z --- FAIL: TestRunner_RunEvent/evalmatrix (2.69s) 2025-08-11T13:02:51.0737270Z runner_test.go:211: 2025-08-11T13:02:51.0737303Z Error Trace: /home/debian/.cache/act/1682da88a8a84081/hostexecutor/act/runner/runner_test.go:211 2025-08-11T13:02:51.0737398Z /home/debian/.cache/act/1682da88a8a84081/hostexecutor/act/runner/runner_test.go:362 2025-08-11T13:02:51.0737436Z Error: Received unexpected error: 2025-08-11T13:02:51.0737470Z failed to copy content to container: Error response from daemon: Could not find the file /var/run/act/ in container ab61dffc6010bc922c0ab2d2c7edb7a7fe066258ce0145d4146771ce6afbc8f9 2025-08-11T13:02:51.0737507Z Test: TestRunner_RunEvent/evalmatrix 2025-08-11T13:02:51.0737551Z Messages: /home/debian/.cache/act/1682da88a8a84081/hostexecutor/act/runner/testdata/evalmatrix In the absence of a stack trace, having three different places in the sources where the same error message shows does not help to figure out how it can happen. This is a daily false negative.
This commit is contained in:
parent
e5603fe6d9
commit
2994dfa964
1 changed files with 3 additions and 3 deletions
|
@ -835,7 +835,7 @@ func (cr *containerReference) CopyTarStream(ctx context.Context, destPath string
|
|||
// Copy Content
|
||||
err = cr.cli.CopyToContainer(ctx, cr.id, destPath, tarStream, container.CopyToContainerOptions{})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to copy content to container: %w", err)
|
||||
return fmt.Errorf("copyTarStream: failed to copy content to container: %w", err)
|
||||
}
|
||||
// If this fails, then folders have wrong permissions on non root container
|
||||
if cr.UID != 0 || cr.GID != 0 {
|
||||
|
@ -911,7 +911,7 @@ func (cr *containerReference) copyDir(dstPath, srcPath string, useGitIgnore bool
|
|||
}
|
||||
err = cr.cli.CopyToContainer(ctx, cr.id, "/", tarFile, container.CopyToContainerOptions{})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to copy content to container: %w", err)
|
||||
return fmt.Errorf("copyDir: failed to copy content to container: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ func (cr *containerReference) copyContent(dstPath string, files ...*FileEntry) c
|
|||
logger.Debugf("Extracting content to '%s'", dstPath)
|
||||
err := cr.cli.CopyToContainer(ctx, cr.id, dstPath, &buf, container.CopyToContainerOptions{})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to copy content to container: %w", err)
|
||||
return fmt.Errorf("copyContent: failed to copy content to container: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue