Skip to content

Commit

Permalink
enhancement(5832): reverted fixture_install.go changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanyalti committed Dec 19, 2024
1 parent 21ef9ef commit 6d032d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/testing/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ func (f *Fixture) RunBeat(ctx context.Context) error {
process.WithContext(ctx),
process.WithArgs(args),
process.WithCmdOptions(attachOutErr(stdOut, stdErr)))

if err != nil {
return fmt.Errorf("failed to spawn %s: %w", f.binaryName, err)
}
Expand Down Expand Up @@ -395,8 +396,7 @@ func RunProcess(t *testing.T,
lp Logger,
ctx context.Context, runLength time.Duration,
logOutput, allowErrs bool,
processPath string, args ...string,
) error {
processPath string, args ...string) error {
if _, deadlineSet := ctx.Deadline(); !deadlineSet {
t.Fatal("Context passed to RunProcess() has no deadline set.")
}
Expand All @@ -414,6 +414,7 @@ func RunProcess(t *testing.T,
process.WithContext(ctx),
process.WithArgs(args),
process.WithCmdOptions(attachOutErr(stdOut, stdErr)))

if err != nil {
return fmt.Errorf("failed to spawn %q: %w", processPath, err)
}
Expand Down Expand Up @@ -543,6 +544,7 @@ func (f *Fixture) executeWithClient(ctx context.Context, command string, disable
process.WithContext(ctx),
process.WithArgs(args),
process.WithCmdOptions(attachOutErr(stdOut, stdErr)))

if err != nil {
return fmt.Errorf("failed to spawn %s: %w", f.binaryName, err)
}
Expand Down

0 comments on commit 6d032d2

Please sign in to comment.