Add annotations to routes and apps (#866)

Adds 'annotations' attribute to Routes and Apps
This commit is contained in:
Owen Cliffe
2018-03-20 18:02:49 +00:00
committed by GitHub
parent 845f40ee86
commit d25b5af59d
31 changed files with 1838 additions and 669 deletions

View File

@@ -3,6 +3,7 @@ package tests
import (
"bytes"
"encoding/json"
"github.com/fnproject/fn_go/models"
"net/url"
"path"
"strconv"
@@ -16,16 +17,16 @@ type JSONResponse struct {
func TestFnJSONFormats(t *testing.T) {
t.Parallel()
s := SetupDefaultSuite()
s := SetupHarness()
defer s.Cleanup()
// TODO(treeder): put image in fnproject @ dockerhub
image := "denismakogon/test-hot-json-go:0.0.1"
format := "json"
route := "/test-hot-json-go"
CreateApp(t, s.Context, s.Client, s.AppName, map[string]string{})
CreateRoute(t, s.Context, s.Client, s.AppName, route, image, "sync",
format, s.Timeout, s.IdleTimeout, s.RouteConfig, s.RouteHeaders)
s.GivenAppExists(t, &models.App{Name: s.AppName})
rt := s.BasicRoute()
rt.Image = "denismakogon/test-hot-json-go:0.0.1"
rt.Format = "json"
s.GivenRouteExists(t, s.AppName, rt)
u := url.URL{
Scheme: "http",
@@ -63,5 +64,4 @@ func TestFnJSONFormats(t *testing.T) {
}
}
DeleteApp(t, s.Context, s.Client, s.AppName)
}