mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
functions: hot containers (#332)
* functions: modify datastore to accomodate hot containers support * functions: protocol between functions and hot containers * functions: add hot containers clockwork * fn: add hot containers support
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/iron-io/functions/api/models"
|
||||
"github.com/iron-io/functions/api/runner/task"
|
||||
)
|
||||
|
||||
func TestRunnerHello(t *testing.T) {
|
||||
@@ -31,7 +32,7 @@ func TestRunnerHello(t *testing.T) {
|
||||
{&models.Route{Image: "iron/hello"}, `{"name": "test"}`, "success", "Hello test!", ""},
|
||||
} {
|
||||
var stdout, stderr bytes.Buffer
|
||||
cfg := &Config{
|
||||
cfg := &task.Config{
|
||||
ID: fmt.Sprintf("hello-%d-%d", i, time.Now().Unix()),
|
||||
Image: test.route.Image,
|
||||
Timeout: 5 * time.Second,
|
||||
@@ -84,7 +85,7 @@ func TestRunnerError(t *testing.T) {
|
||||
{&models.Route{Image: "iron/error"}, `{"name": "test"}`, "error", "", "RuntimeError"},
|
||||
} {
|
||||
var stdout, stderr bytes.Buffer
|
||||
cfg := &Config{
|
||||
cfg := &task.Config{
|
||||
ID: fmt.Sprintf("err-%d-%d", i, time.Now().Unix()),
|
||||
Image: test.route.Image,
|
||||
Timeout: 5 * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user