(ctx context.Context, script string)
| 3612 | } |
| 3613 | |
| 3614 | func (r *Replayer) executeScript(ctx context.Context, script string) error { |
| 3615 | |
| 3616 | if script == "" { |
| 3617 | return nil |
| 3618 | } |
| 3619 | |
| 3620 | // Define the function to cancel the command |
| 3621 | cmdCancel := func(cmd *exec.Cmd) func() error { |
| 3622 | return func() error { |
| 3623 | return utils.InterruptProcessTree(r.logger, cmd.Process.Pid, syscall.SIGINT) |
| 3624 | } |
| 3625 | } |
| 3626 | |
| 3627 | cmdErr := utils.ExecuteCommand(ctx, r.logger, script, cmdCancel, 25*time.Second, nil) |
| 3628 | if cmdErr.Err != nil { |
| 3629 | return fmt.Errorf("failed to execute script: %w", cmdErr.Err) |
| 3630 | } |
| 3631 | return nil |
| 3632 | } |
| 3633 | |
| 3634 | func (r *Replayer) DeleteTestSet(ctx context.Context, testSetID string) error { |
| 3635 | return r.testDB.DeleteTestSet(ctx, testSetID) |
no test coverage detected