summaryrefslogtreecommitdiff
path: root/worker_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-01-28 15:02:32 +0300
committerWolfy-J <[email protected]>2018-01-28 15:02:32 +0300
commitbb62198db284e0f6aa2722e3a8935190853820fb (patch)
tree0c16a2a359563c468065b7c2a8f855ce7178161a /worker_test.go
parentd4b52bb35417c464755af95366243e65b6cdc836 (diff)
minor CS
Diffstat (limited to 'worker_test.go')
-rw-r--r--worker_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/worker_test.go b/worker_test.go
index 0cb6f2d4..65adae28 100644
--- a/worker_test.go
+++ b/worker_test.go
@@ -42,6 +42,20 @@ func Test_Echo(t *testing.T) {
assert.Equal(t, "hello", res.String())
}
+func Test_String(t *testing.T) {
+ cmd := exec.Command("php", "tests/client.php", "echo", "pipes")
+
+ w, _ := NewPipeFactory().SpawnWorker(cmd)
+ go func() {
+ assert.NoError(t, w.Wait())
+ }()
+ defer w.Stop()
+
+ assert.Contains(t, w.String(), "php tests/client.php echo pipes")
+ assert.Contains(t, w.String(), "ready")
+ assert.Contains(t, w.String(), "numExecs: 0")
+}
+
func Test_Echo_Slow(t *testing.T) {
cmd := exec.Command("php", "tests/slow-client.php", "echo", "pipes", "10", "10")