Skip to content

Commit

Permalink
Fix compile error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyworld committed May 13, 2014
1 parent 9fcb83b commit 5642c3e
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions http/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ type LoopingHTTPSuite struct {
creds *auth.Credentials
}

func (s *LoopingHTTPSuite) SetUpSuite(c *gc.C) {
s.HTTPSuite.SetUpSuite(c)
authCreds, err := auth.NewAuth("test_user", key, "rsa-sha256")
c.Assert(err, gc.IsNil)
s.creds = &auth.Credentials{
UserAuthentication: authCreds,
SdcKeyId: "test_key",
SdcEndpoint: auth.Endpoint{URL: "http://gotest.api.joyentcloud.com"},
}
}

func (s *LoopingHTTPSuite) setupLoopbackRequest() (*http.Header, chan string, *Client) {
var headers http.Header
bodyChan := make(chan string, 1)
Expand All @@ -78,16 +89,8 @@ type HTTPSClientTestSuite struct {
LoopingHTTPSuite
}

var _ = gc.Suite(&HTTPClientTestSuite{LoopingHTTPSuite{httpsuite.HTTPSuite{}, &auth.Credentials{
UserAuthentication: auth.Auth{User: "test_user", PrivateKey: key, Algorithm: "rsa-sha256"},
SdcKeyId: "test_key",
SdcEndpoint: auth.Endpoint{URL: "http://gotest.api.joyentcloud.com"},
}}})
var _ = gc.Suite(&HTTPSClientTestSuite{LoopingHTTPSuite{httpsuite.HTTPSuite{UseTLS: true}, &auth.Credentials{
UserAuthentication: auth.Auth{User: "test_user", PrivateKey: key, Algorithm: "rsa-sha256"},
SdcKeyId: "test_key",
SdcEndpoint: auth.Endpoint{URL: "http://gotest.api.joyentcloud.com"},
}}})
var _ = gc.Suite(&HTTPClientTestSuite{})
var _ = gc.Suite(&HTTPSClientTestSuite{})

func (s *HTTPClientTestSuite) assertHeaderValues(c *gc.C, apiVersion string) {
emptyHeaders := http.Header{}
Expand Down

0 comments on commit 5642c3e

Please sign in to comment.