mirror of
https://github.com/go-task/task.git
synced 2025-06-04 23:38:05 +02:00
fix: signal and watch tests
This commit is contained in:
parent
600966ac26
commit
22cd0edfc9
@ -156,12 +156,8 @@ func TestSignalSentToProcessGroup(t *testing.T) {
|
|||||||
|
|
||||||
err := sut.Wait()
|
err := sut.Wait()
|
||||||
|
|
||||||
// In case of a subprocess failing, Task always returns exit code 1, not the
|
|
||||||
// exit code returned by the subprocess. This is understandable, since Task
|
|
||||||
// supports parallel execution: if two parallel subprocess fail, each with a
|
|
||||||
// different exit code, which one should Task report? This would be a race.
|
|
||||||
var wantErr *exec.ExitError
|
var wantErr *exec.ExitError
|
||||||
const wantExitStatus = 1 // Task always returns exit code 1 in case of error
|
const wantExitStatus = 201
|
||||||
if errors.As(err, &wantErr) {
|
if errors.As(err, &wantErr) {
|
||||||
if wantErr.ExitCode() != wantExitStatus {
|
if wantErr.ExitCode() != wantExitStatus {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
|
@ -12,6 +12,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/go-task/task/v3"
|
"github.com/go-task/task/v3"
|
||||||
"github.com/go-task/task/v3/internal/filepathext"
|
"github.com/go-task/task/v3/internal/filepathext"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user