diff --git a/controller/api_test.go b/controller/api_test.go index d61528ad..f241866d 100644 --- a/controller/api_test.go +++ b/controller/api_test.go @@ -199,7 +199,7 @@ func TestWatchApi(t *testing.T) { Name: "foo", Uid: "", }, - Url: "", + Target: "", } m, err := g.client.WatchCreate(testWatch) panicIf(err) @@ -208,7 +208,7 @@ func TestWatchApi(t *testing.T) { w, err := g.client.WatchGet(m) panicIf(err) testWatch.Metadata.Uid = m.Uid - w.Url = "" + w.Target = "" assert(*testWatch == *w, "watch should match after reading") testWatch.Metadata.Name = "yyy" diff --git a/controller/watchApi.go b/controller/watchApi.go index b1c67d69..cbec5e6b 100644 --- a/controller/watchApi.go +++ b/controller/watchApi.go @@ -56,7 +56,7 @@ func (api *API) WatchApiCreate(w http.ResponseWriter, r *http.Request) { return } - watch.Url = fission.UrlForFunction(&watch.Function) + watch.Target = fission.UrlForFunction(&watch.Function) uid, err := api.WatchStore.Create(&watch) if err != nil {