~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/gopkg.in/juju/charmstore.v5-unstable/internal/charmstore/server_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
func (s *ServerSuite) TestNewServerWithVersions(c *gc.C) {
39
39
        db := s.Session.DB("foo")
40
40
        serveVersion := func(vers string) NewAPIHandlerFunc {
41
 
                return func(p *Pool, config ServerParams) HTTPCloseHandler {
 
41
                return func(p *Pool, config ServerParams, _ string) HTTPCloseHandler {
42
42
                        return nopCloseHandler{
43
43
                                router.HandleJSON(func(_ http.Header, req *http.Request) (interface{}, error) {
44
44
                                        return versionResponse{
91
91
}
92
92
 
93
93
func (s *ServerSuite) TestNewServerWithConfig(c *gc.C) {
94
 
        serveConfig := func(p *Pool, config ServerParams) HTTPCloseHandler {
 
94
        serveConfig := func(p *Pool, config ServerParams, _ string) HTTPCloseHandler {
95
95
                return nopCloseHandler{
96
96
                        router.HandleJSON(func(_ http.Header, req *http.Request) (interface{}, error) {
97
97
                                return config, nil
111
111
}
112
112
 
113
113
func (s *ServerSuite) TestNewServerWithElasticSearch(c *gc.C) {
114
 
        serveConfig := func(p *Pool, config ServerParams) HTTPCloseHandler {
 
114
        serveConfig := func(p *Pool, config ServerParams, _ string) HTTPCloseHandler {
115
115
                return nopCloseHandler{
116
116
                        router.HandleJSON(func(_ http.Header, req *http.Request) (interface{}, error) {
117
117
                                return config, nil