test: explicitly opt authoring fixtures into publication capability
This commit is contained in:
@@ -26,7 +26,7 @@ func TestCreateAndSubmit(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer store.Close()
|
||||
srv := httptest.NewServer(server.Handler(ctx, store))
|
||||
srv := httptest.NewServer(server.HandlerWithOptions(ctx, server.Options{AllowAuthoring: true}, store))
|
||||
defer srv.Close()
|
||||
m := New(ctx, "ws"+strings.TrimPrefix(srv.URL, "http")+"/connect")
|
||||
connected := m.connect()().(connectedMsg)
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestRetainedDraftBrowserValidatesAndExplicitlySubmits(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer store.Close()
|
||||
srv := httptest.NewServer(server.Handler(ctx, store))
|
||||
srv := httptest.NewServer(server.HandlerWithOptions(ctx, server.Options{AllowAuthoring: true}, store))
|
||||
defer srv.Close()
|
||||
url := "ws" + strings.TrimPrefix(srv.URL, "http") + "/connect"
|
||||
d, err := draft.Create("", pipeline.Template([]string{"worker"}, true), url, true, 0)
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestEditorReturnFindsPublishedVersionAndReloadsLatest(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer store.Close()
|
||||
handler := server.Handler(ctx, store)
|
||||
handler := server.HandlerWithOptions(ctx, server.Options{AllowAuthoring: true}, store)
|
||||
srv := httptest.NewServer(handler)
|
||||
defer func() { cancel(); srv.Close(); server.WaitRuns(handler) }()
|
||||
source := pipeline.Template([]string{"planner"}, true)
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestSearchVersionsAndEditSubmission(t *testing.T) {
|
||||
if _, err := store.Submit(ctx, "demo", v2); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
srv := httptest.NewServer(server.Handler(ctx, store))
|
||||
srv := httptest.NewServer(server.HandlerWithOptions(ctx, server.Options{AllowAuthoring: true}, store))
|
||||
defer srv.Close()
|
||||
m := New(ctx, "ws"+strings.TrimPrefix(srv.URL, "http")+"/connect")
|
||||
connected := m.connect()().(connectedMsg)
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestTUIEditDraftPublishesToConnectedServerAsNewPipeline(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer store.Close()
|
||||
srv := httptest.NewServer(server.Handler(ctx, store))
|
||||
srv := httptest.NewServer(server.HandlerWithOptions(ctx, server.Options{AllowAuthoring: true}, store))
|
||||
defer srv.Close()
|
||||
url := "ws" + strings.TrimPrefix(srv.URL, "http") + "/connect"
|
||||
source := pipeline.Template([]string{"worker"}, true)
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestTemplateSubmitNamesRetainsAndExplicitlyPublishesSelectedTemplate(t *tes
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer store.Close()
|
||||
srv := httptest.NewServer(server.Handler(ctx, store))
|
||||
srv := httptest.NewServer(server.HandlerWithOptions(ctx, server.Options{AllowAuthoring: true}, store))
|
||||
defer srv.Close()
|
||||
url := "ws" + strings.TrimPrefix(srv.URL, "http") + "/connect"
|
||||
m := New(ctx, url)
|
||||
|
||||
Reference in New Issue
Block a user