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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/upgrading_root_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:
4
4
package apiserver_test
5
5
 
6
6
import (
 
7
        "github.com/juju/errors"
7
8
        jc "github.com/juju/testing/checkers"
8
9
        gc "gopkg.in/check.v1"
9
10
 
10
11
        "github.com/juju/juju/apiserver"
 
12
        "github.com/juju/juju/apiserver/params"
11
13
        "github.com/juju/juju/testing"
12
14
)
13
15
 
36
38
 
37
39
        caller, err := root.FindMethod("Client", 1, "ModelSet")
38
40
 
39
 
        c.Assert(err, gc.ErrorMatches, "upgrade in progress - Juju functionality is limited")
 
41
        c.Assert(errors.Cause(err), gc.Equals, params.UpgradeInProgressError)
40
42
        c.Assert(caller, gc.IsNil)
41
43
}
42
44
 
52
54
func (r *upgradingRootSuite) TestFindMethodNonExistentVersion(c *gc.C) {
53
55
        root := apiserver.TestingUpgradingRoot(nil)
54
56
 
55
 
        caller, err := root.FindMethod("Client", 99999999, "Status")
 
57
        caller, err := root.FindMethod("Client", 99999999, "FullStatus")
56
58
 
57
59
        c.Assert(err, gc.ErrorMatches, "unknown version \\(99999999\\) of interface \"Client\"")
58
60
        c.Assert(caller, gc.IsNil)