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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/core/migration/targetinfo_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        }{{
30
30
                "empty ControllerTag",
31
31
                func(info *migration.TargetInfo) {
32
 
                        info.ControllerTag = names.NewModelTag("fooo")
 
32
                        info.ControllerTag = names.NewControllerTag("fooo")
33
33
                },
34
34
                "ControllerTag not valid",
35
35
        }, {
36
36
                "invalid ControllerTag",
37
37
                func(info *migration.TargetInfo) {
38
 
                        info.ControllerTag = names.NewModelTag("")
 
38
                        info.ControllerTag = names.NewControllerTag("")
39
39
                },
40
40
                "ControllerTag not valid",
41
41
        }, {
102
102
}
103
103
 
104
104
func makeValidTargetInfo(c *gc.C) migration.TargetInfo {
105
 
        modelTag := names.NewModelTag(utils.MustNewUUID().String())
106
105
        mac, err := macaroon.New([]byte("secret"), "id", "location")
107
106
        c.Assert(err, jc.ErrorIsNil)
108
107
        return migration.TargetInfo{
109
 
                ControllerTag: modelTag,
 
108
                ControllerTag: names.NewControllerTag(utils.MustNewUUID().String()),
110
109
                Addrs:         []string{"1.2.3.4:5555"},
111
110
                CACert:        "cert",
112
111
                AuthTag:       names.NewUserTag("user"),