Fix runner changes (#135)

* Upgrade iron-io/runner to 165c16a9

* fix support for Stdin to work
This commit is contained in:
Seif Lotfy سيف لطفي
2016-10-07 21:17:40 +02:00
committed by C Cirello
parent 1da3c7c7cf
commit 064d597b60
5 changed files with 11 additions and 14 deletions

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"strings"
"testing"
"time"
@@ -33,11 +34,9 @@ func TestRunnerHello(t *testing.T) {
ID: fmt.Sprintf("hello-%d-%d", i, time.Now().Unix()),
Image: test.route.Image,
Timeout: 5 * time.Second,
Env: map[string]string{
"PAYLOAD": test.payload,
},
Stdout: &stdout,
Stderr: &stderr,
Stdin: strings.NewReader(test.payload),
Stdout: &stdout,
Stderr: &stderr,
}
result, err := runner.Run(ctx, cfg)
@@ -82,11 +81,9 @@ func TestRunnerError(t *testing.T) {
ID: fmt.Sprintf("err-%d-%d", i, time.Now().Unix()),
Image: test.route.Image,
Timeout: 5 * time.Second,
Env: map[string]string{
"PAYLOAD": test.payload,
},
Stdout: &stdout,
Stderr: &stderr,
Stdin: strings.NewReader(test.payload),
Stdout: &stdout,
Stderr: &stderr,
}
result, err := runner.Run(ctx, cfg)