Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion provisionersdk/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"net/http"
"net/http/httptest"
"net/url"
"os"
"os/exec"
"runtime"
"strings"
Expand Down Expand Up @@ -119,7 +120,9 @@ func TestAgentScript(t *testing.T) {

// Kill the command, wait for the command to yield.
err := cmd.Cancel()
if err != nil {
if errors.Is(err, os.ErrProcessDone) {
t.Log("script has already finished execution")
} else if err != nil {
t.Fatalf("unable to cancel the command: %v, see logs:\n%s", err, output.String())
}
wg.Wait()
Expand Down
Loading