mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Add annotations to routes and apps (#866)
Adds 'annotations' attribute to Routes and Apps
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user