X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/dc00995b1843cd1decebffe1493e55a16c3c0df9..3445ed729dbccd21878373e01477be79e74a8453:/services/keepstore/pull_worker_integration_test.go diff --git a/services/keepstore/pull_worker_integration_test.go b/services/keepstore/pull_worker_integration_test.go index 762abff533..3a3069ab77 100644 --- a/services/keepstore/pull_worker_integration_test.go +++ b/services/keepstore/pull_worker_integration_test.go @@ -27,7 +27,7 @@ func SetupPullWorkerIntegrationTest(t *testing.T, testData PullWorkIntegrationTe // start api and keep servers arvadostest.StartAPI() - arvadostest.StartKeep() + arvadostest.StartKeep(2, false) // make arvadosclient arv, err := arvadosclient.MakeArvadosClient() @@ -107,7 +107,7 @@ func TestPullWorkerIntegration_GetExistingLocator(t *testing.T) { func performPullWorkerIntegrationTest(testData PullWorkIntegrationTestData, pullRequest PullRequest, t *testing.T) { // Override PutContent to mock PutBlock functionality - defer func(orig func([]byte, string)(error)) { PutContent = orig }(PutContent) + defer func(orig func([]byte, string) error) { PutContent = orig }(PutContent) PutContent = func(content []byte, locator string) (err error) { if string(content) != testData.Content { t.Errorf("PutContent invoked with unexpected data. Expected: %s; Found: %s", testData.Content, content) @@ -116,7 +116,9 @@ func performPullWorkerIntegrationTest(testData PullWorkIntegrationTestData, pull } // Override GetContent to mock keepclient Get functionality - defer func(orig func(string, *keepclient.KeepClient)(io.ReadCloser, int64, string, error)) { GetContent = orig }(GetContent) + defer func(orig func(string, *keepclient.KeepClient) (io.ReadCloser, int64, string, error)) { + GetContent = orig + }(GetContent) GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) ( reader io.ReadCloser, contentLength int64, url string, err error) { if testData.GetError != "" { @@ -126,7 +128,7 @@ func performPullWorkerIntegrationTest(testData PullWorkIntegrationTestData, pull return rdr, int64(len(testData.Content)), "", nil } - keepClient.Arvados.ApiToken = GenerateRandomApiToken() + keepClient.Arvados.ApiToken = GenerateRandomAPIToken() err := PullItemAndProcess(pullRequest, keepClient.Arvados.ApiToken, keepClient) if len(testData.GetError) > 0 {