~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/listcontrollers_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:
36
36
func (s *ListControllersSuite) TestListControllers(c *gc.C) {
37
37
        s.expectedOutput = `
38
38
CONTROLLER                 MODEL     USER         SERVER
39
 
local.aws-test             -         -            instance-1-2-4.useast.aws.com
40
 
local.mallards*            my-model  admin@local  maas-1-05.cluster.mallards
41
 
local.mark-test-prodstack  -         -            vm-23532.prodstack.canonical.com
 
39
local.aws-test             -         -            this-is-aws-test-of-many-api-endpoints
 
40
local.mallards*            my-model  admin@local  this-is-another-of-many-api-endpoints
 
41
local.mark-test-prodstack  -         -            this-is-one-of-many-api-endpoints
42
42
 
43
43
`[1:]
44
44
 
50
50
        s.expectedOutput = `
51
51
controllers:
52
52
  local.aws-test:
53
 
    recent-server: instance-1-2-4.useast.aws.com
54
 
    servers: [instance-1-2-4.useast.aws.com]
 
53
    recent-server: this-is-aws-test-of-many-api-endpoints
55
54
    uuid: this-is-the-aws-test-uuid
56
55
    api-endpoints: [this-is-aws-test-of-many-api-endpoints]
57
56
    ca-cert: this-is-aws-test-ca-cert
58
57
  local.mallards:
59
58
    current-model: my-model
60
59
    user: admin@local
61
 
    recent-server: maas-1-05.cluster.mallards
62
 
    servers: [maas-1-05.cluster.mallards]
 
60
    recent-server: this-is-another-of-many-api-endpoints
63
61
    uuid: this-is-another-uuid
64
62
    api-endpoints: [this-is-another-of-many-api-endpoints, this-is-one-more-of-many-api-endpoints]
65
63
    ca-cert: this-is-another-ca-cert
66
64
  local.mark-test-prodstack:
67
 
    recent-server: vm-23532.prodstack.canonical.com
68
 
    servers: [vm-23532.prodstack.canonical.com, great.test.server.hostname.co.nz]
 
65
    recent-server: this-is-one-of-many-api-endpoints
69
66
    uuid: this-is-a-uuid
70
67
    api-endpoints: [this-is-one-of-many-api-endpoints]
71
68
    ca-cert: this-is-a-ca-cert
87
84
                Controllers: map[string]controller.ControllerItem{
88
85
                        "local.aws-test": {
89
86
                                ControllerUUID: "this-is-the-aws-test-uuid",
90
 
                                Server:         "instance-1-2-4.useast.aws.com",
91
 
                                Servers:        []string{"instance-1-2-4.useast.aws.com"},
 
87
                                Server:         "this-is-aws-test-of-many-api-endpoints",
92
88
                                APIEndpoints:   []string{"this-is-aws-test-of-many-api-endpoints"},
93
89
                                CACert:         "this-is-aws-test-ca-cert",
94
90
                        },
96
92
                                ControllerUUID: "this-is-another-uuid",
97
93
                                ModelName:      "my-model",
98
94
                                User:           "admin@local",
99
 
                                Server:         "maas-1-05.cluster.mallards",
100
 
                                Servers:        []string{"maas-1-05.cluster.mallards"},
 
95
                                Server:         "this-is-another-of-many-api-endpoints",
101
96
                                APIEndpoints:   []string{"this-is-another-of-many-api-endpoints", "this-is-one-more-of-many-api-endpoints"},
102
97
                                CACert:         "this-is-another-ca-cert",
103
98
                        },
104
99
                        "local.mark-test-prodstack": {
105
100
                                ControllerUUID: "this-is-a-uuid",
106
 
                                Server:         "vm-23532.prodstack.canonical.com",
107
 
                                Servers:        []string{"vm-23532.prodstack.canonical.com", "great.test.server.hostname.co.nz"},
 
101
                                Server:         "this-is-one-of-many-api-endpoints",
108
102
                                APIEndpoints:   []string{"this-is-one-of-many-api-endpoints"},
109
103
                                CACert:         "this-is-a-ca-cert",
110
104
                        },