Merge branch 'master' into 14259-pysdk-remote-block-copy
[arvados.git] / sdk / go / arvados / keep_service_test.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 package arvados
6
7 import (
8         "net/http"
9
10         check "gopkg.in/check.v1"
11 )
12
13 var _ = check.Suite(&KeepServiceSuite{})
14
15 type KeepServiceSuite struct{}
16
17 func (*KeepServiceSuite) TestIndexTimeout(c *check.C) {
18         client := &Client{
19                 Client: &http.Client{
20                         Transport: &timeoutTransport{response: []byte("\n")},
21                 },
22                 APIHost:   "zzzzz.arvadosapi.com",
23                 AuthToken: "xyzzy",
24         }
25         _, err := (&KeepService{}).IndexMount(client, "fake", "")
26         c.Check(err, check.ErrorMatches, `.*timeout.*`)
27 }