(runID, source string)
| 14 | } |
| 15 | |
| 16 | func (s *state) snapshotConfig(runID, source string) (string, error) { |
| 17 | if source == "" { |
| 18 | return "", nil |
| 19 | } |
| 20 | relative := filepath.Join("config", "runs", runID, "before") |
| 21 | if err := copyConfigTree(source, filepath.Join(s.dir, relative)); err != nil { |
| 22 | return "", fmt.Errorf("copying configuration fixture: %w", err) |
| 23 | } |
| 24 | return filepath.ToSlash(relative), nil |
| 25 | } |
| 26 | |
| 27 | // copyConfigTree copies fixture bytes without following contained symlinks. |
| 28 | // Each destination is new and private; no caller configuration is copied implicitly. |
no test coverage detected