示例#1
0
// Test if performing a request invokes the SDBs configured
// http.Client
func (s *ClientSuite) TestClientUsed(c *C) {
	transport := &FlaggingRoundTripper{false, http.DefaultTransport}
	instance := sdb.SDBWithClient(s.auth, s.region, &http.Client{Transport: transport})
	testServer.PrepareResponse(200, nil, TestSelectXmlOK)
	instance.Select("select Color from MyDomain where Color like 'Blue%'", true)
	testServer.WaitRequest()
	c.Assert(transport.Transported, Equals, true)
}
示例#2
0
// Test if SDBWithClient returns an SDB
func (s *ClientSuite) TestWithClient(c *C) {
	instance := sdb.SDBWithClient(s.auth, s.region, &http.Client{})
	c.Assert(instance, NotNil)
}