2798: Initial commit, supports querying API server for list of Keep disks.
[arvados.git] / sdk / go / src / arvados.org / keepclient / keepclient_test.go
1 package keepclient
2
3 import (
4         . "gopkg.in/check.v1"
5         "testing"
6 )
7
8 // Hook up gocheck into the "go test" runner.
9 func Test(t *testing.T) { TestingT(t) }
10
11 type MySuite struct{}
12
13 var _ = Suite(&MySuite{})
14
15 func (s *MySuite) TestGetKeepDisks(c *C) {
16         k, err := KeepDisks()
17         c.Assert(err, Equals, nil)
18         c.Assert(len(k), Equals, 2)
19         c.Assert(k[0].Hostname, Equals, "localhost")
20         c.Assert(k[0].Port, Equals, 25108)
21         c.Assert(k[1].Hostname, Equals, "localhost")
22         c.Assert(k[1].Port, Equals, 25107)
23 }