16923: Add "TrustedClients" configuration option.
[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         "context"
9         "net/http"
10
11         check "gopkg.in/check.v1"
12 )
13
14 var _ = check.Suite(&KeepServiceSuite{})
15
16 type KeepServiceSuite struct{}
17
18 func (*KeepServiceSuite) TestIndexTimeout(c *check.C) {
19         client := &Client{
20                 Client: &http.Client{
21                         Transport: &timeoutTransport{response: []byte("\n")},
22                 },
23                 APIHost:   "zzzzz.arvadosapi.com",
24                 AuthToken: "xyzzy",
25         }
26         _, err := (&KeepService{}).IndexMount(context.Background(), client, "fake", "")
27         c.Check(err, check.ErrorMatches, `.*timeout.*`)
28 }