15003: Fix errant warnings on Workbench configs.
[arvados.git] / services / keepstore / pull_worker_test.go
index e31979f2273464d605560d2c9d446d3be23ba690..8e667e048f47ff3f3ac91df65c960ac94511e8b3 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
@@ -10,6 +14,7 @@ import (
 
        "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
        "git.curoverse.com/arvados.git/sdk/go/keepclient"
+       "github.com/prometheus/client_golang/prometheus"
        . "gopkg.in/check.v1"
 )
 
@@ -54,7 +59,7 @@ func (s *PullWorkerTestSuite) TearDownTest(c *C) {
        pullq = nil
        teardown()
        theConfig = DefaultConfig()
-       theConfig.Start()
+       theConfig.Start(prometheus.NewRegistry())
 }
 
 var firstPullList = []byte(`[
@@ -123,7 +128,7 @@ func (s *PullWorkerTestSuite) TestSpecifyMountUUID(c *C) {
                        requestBody: []byte(`[{
                                "locator":"acbd18db4cc2f85cedef654fccc4a4d8+3",
                                "servers":["server_1","server_2"],
-                               "mountuuid":"` + spec.sendUUID + `"}]`),
+                               "mount_uuid":"` + spec.sendUUID + `"}]`),
                })
                c.Assert(resp.Code, Equals, http.StatusOK)
                expectEqualWithin(c, time.Second, 0, func() interface{} {
@@ -267,6 +272,7 @@ func (s *PullWorkerTestSuite) performTest(testData PullWorkerTestData, c *C) {
 
        c.Check(getStatusItem("PullQueue", "InProgress"), Equals, float64(0))
        c.Check(getStatusItem("PullQueue", "Queued"), Equals, float64(0))
+       c.Check(getStatusItem("Version"), Not(Equals), "")
 
        response := IssueRequest(&testData.req)
        c.Assert(response.Code, Equals, testData.responseCode)