mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix route update procedure
API impact: We need to drop default value for type because it brought this type of bugs. Starting this patch users should specify route type through CLI or func.yml Closes: #222
This commit is contained in:
@@ -12,6 +12,18 @@ func TestRoutes(t *testing.T) {
|
||||
newRouteType := "sync"
|
||||
newRoutePath := id.New().String()
|
||||
|
||||
t.Run("create-route-with-empty-type", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
s := SetupDefaultSuite()
|
||||
CreateApp(t, s.Context, s.Client, s.AppName, map[string]string{})
|
||||
_, err := createRoute(s.Context, s.Client, s.AppName, s.RoutePath, s.Image, "",
|
||||
s.RouteConfig, s.RouteHeaders)
|
||||
if err == nil {
|
||||
t.Errorf("Should fail with Invalid route Type.")
|
||||
}
|
||||
DeleteApp(t, s.Context, s.Client, s.AppName)
|
||||
})
|
||||
|
||||
t.Run("create-route", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
s := SetupDefaultSuite()
|
||||
|
||||
Reference in New Issue
Block a user