mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Timestamps on apps / routes (#614)
* route updated_at * add app created at, fix some route updated_at bugs * add app updated_at TODO need to add tests through front end TODO for validation we don't really want to use the validate wrapper since it's a programmer error and not a user error, hopefully tests block this. * add tests for timestamps to exist / change on apps&routes * route equals at done, fix tests wit dis * fix up the equals sugar * add swagger * fix rebase * precisely allocate maps in clone * vetted * meh * fix api tests
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
package tests
|
||||
|
||||
//
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/fnproject/fn/api/id"
|
||||
api_models "github.com/fnproject/fn/api/models"
|
||||
"github.com/fnproject/fn_go/models"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
func TestRoutes(t *testing.T) {
|
||||
@@ -203,7 +202,7 @@ func TestRoutes(t *testing.T) {
|
||||
routeHeaders["B"] = []string{"b"}
|
||||
DeployRoute(t, s.Context, s.Client, s.AppName, s.RoutePath, s.Image, s.RouteType, s.Format, s.RouteConfig, routeHeaders)
|
||||
sameRoute := DeployRoute(t, s.Context, s.Client, s.AppName, s.RoutePath, s.Image, s.RouteType, s.Format, s.RouteConfig, routeHeaders)
|
||||
if ok := reflect.DeepEqual(sameRoute.Headers, routeHeaders); !ok {
|
||||
if !api_models.Headers(sameRoute.Headers).Equals(api_models.Headers(routeHeaders)) {
|
||||
t.Error("Route headers should remain the same after multiple deploys with exact the same parameters")
|
||||
}
|
||||
DeleteApp(t, s.Context, s.Client, s.AppName)
|
||||
|
||||
Reference in New Issue
Block a user