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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/controller/package_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:
37
37
        c.Assert(err, jc.ErrorIsNil)
38
38
}
39
39
 
40
 
func (s *baseControllerSuite) createTestClientStore(c *gc.C) {
 
40
func (s *baseControllerSuite) createTestClientStore(c *gc.C) *jujuclienttesting.MemStore {
41
41
        controllers, err := jujuclient.ParseControllers([]byte(s.controllersYaml))
42
42
        c.Assert(err, jc.ErrorIsNil)
43
43
 
47
47
        accounts, err := jujuclient.ParseAccounts([]byte(s.accountsYaml))
48
48
        c.Assert(err, jc.ErrorIsNil)
49
49
 
50
 
        s.store = &jujuclienttesting.MemStore{
51
 
                Controllers: controllers,
52
 
                Models:      models,
53
 
                Accounts:    accounts,
54
 
        }
 
50
        store := jujuclienttesting.NewMemStore()
 
51
        store.Controllers = controllers
 
52
        store.Models = models
 
53
        store.Accounts = accounts
 
54
        s.store = store
 
55
        return store
55
56
}
56
57
 
57
58
const testControllersYaml = `
58
59
controllers:
59
60
  local.aws-test:
60
 
    servers: [instance-1-2-4.useast.aws.com]
61
61
    uuid: this-is-the-aws-test-uuid
62
62
    api-endpoints: [this-is-aws-test-of-many-api-endpoints]
63
63
    ca-cert: this-is-aws-test-ca-cert
64
64
  local.mallards:
65
 
    servers: [maas-1-05.cluster.mallards]
66
65
    uuid: this-is-another-uuid
67
66
    api-endpoints: [this-is-another-of-many-api-endpoints, this-is-one-more-of-many-api-endpoints]
68
67
    ca-cert: this-is-another-ca-cert
69
68
  local.mark-test-prodstack:
70
 
    servers: [vm-23532.prodstack.canonical.com, great.test.server.hostname.co.nz]
71
69
    uuid: this-is-a-uuid
72
70
    api-endpoints: [this-is-one-of-many-api-endpoints]
73
71
    ca-cert: this-is-a-ca-cert