summaryrefslogtreecommitdiff
path: root/worker/sync_worker_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/sync_worker_test.go')
-rwxr-xr-xworker/sync_worker_test.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/worker/sync_worker_test.go b/worker/sync_worker_test.go
deleted file mode 100755
index 288cbd45..00000000
--- a/worker/sync_worker_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package worker
-
-import (
- "os/exec"
- "testing"
-
- "github.com/spiral/roadrunner/v2/payload"
- "github.com/stretchr/testify/assert"
-)
-
-func Test_NotStarted_String(t *testing.T) {
- cmd := exec.Command("php", "tests/client.php", "echo", "pipes")
-
- w, _ := InitBaseWorker(cmd)
- assert.Contains(t, w.String(), "php tests/client.php echo pipes")
- assert.Contains(t, w.String(), "inactive")
- assert.Contains(t, w.String(), "num_execs: 0")
-}
-
-func Test_NotStarted_Exec(t *testing.T) {
- cmd := exec.Command("php", "tests/client.php", "echo", "pipes")
-
- w, _ := InitBaseWorker(cmd)
-
- sw := From(w)
-
- res, err := sw.Exec(&payload.Payload{Body: []byte("hello")})
-
- assert.Error(t, err)
- assert.Nil(t, res)
-
- assert.Contains(t, err.Error(), "Process is not ready (inactive)")
-}