import (
"bytes"
+ "context"
"encoding/json"
"fmt"
"io"
arvadostest.SetServiceURL(&cluster.Services.Controller, "http://localhost:/")
s.testHandler = &Handler{Cluster: cluster}
s.testServer = newServerFromIntegrationTestEnv(c)
- s.testServer.Server.Handler = httpserver.AddRequestIDs(httpserver.LogRequests(s.log, s.testHandler))
+ s.testServer.Server.Handler = httpserver.HandlerWithContext(
+ ctxlog.Context(context.Background(), s.log),
+ httpserver.AddRequestIDs(httpserver.LogRequests(s.testHandler)))
cluster.RemoteClusters = map[string]arvados.RemoteCluster{
"zzzzz": {
}
func (s *FederationSuite) TestWorkflowCRUD(c *check.C) {
- wf := arvados.Workflow{
- Description: "TestCRUD",
- }
+ var wf arvados.Workflow
{
- body := &strings.Builder{}
- json.NewEncoder(body).Encode(&wf)
req := httptest.NewRequest("POST", "/arvados/v1/workflows", strings.NewReader(url.Values{
- "workflow": {body.String()},
+ "workflow": {`{"description": "TestCRUD"}`},
}.Encode()))
req.Header.Set("Content-type", "application/x-www-form-urlencoded")
req.Header.Set("Authorization", "Bearer "+arvadostest.ActiveToken)