~rogpeppe/juju-core/208-simplify-config-tests

« back to all changes in this revision

Viewing changes to environs/openstack/live_test.go

  • Committer: Dimiter Naydenov
  • Date: 2013-01-23 13:23:33 UTC
  • mfrom: (849.1.4 openstack-bootstrap)
  • Revision ID: dimiter.naydenov@canonical.com-20130123132333-gts5vtsvwb9a4hz5
openstack: bootstrap + tests

Implemented environment bootstrap for the openstack provider + tests
using goose test doubles.

R=rog, niemeyer
CC=
https://codereview.appspot.com/7181046

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
                "type":           "openstack",
43
43
                "auth-method":    "userpass",
44
44
                "control-bucket": "juju-test-" + uniqueName,
 
45
                "ca-cert":        coretesting.CACert,
 
46
                "ca-private-key": coretesting.CAKey,
45
47
        }
46
48
        return attrs
47
49
}
72
74
        publicBucketURL, err := client.MakeServiceURL("object-store", nil)
73
75
        c.Assert(err, IsNil)
74
76
        attrs := makeTestConfig()
 
77
        attrs["admin-secret"] = "secret"
75
78
        attrs["username"] = t.cred.User
76
79
        attrs["password"] = t.cred.Secrets
77
80
        attrs["region"] = t.cred.Region
79
82
        attrs["tenant-name"] = t.cred.TenantName
80
83
        attrs["public-bucket-url"] = publicBucketURL
81
84
        t.Config = attrs
 
85
        t.LiveTests = jujutest.LiveTests{
 
86
                Config:         attrs,
 
87
                Attempt:        *openstack.ShortAttempt,
 
88
                CanOpenState:   false, // no state; local tests (unless -live is passed)
 
89
                HasProvisioner: false, // don't deploy anything
 
90
        }
82
91
        e, err := environs.NewFromAttrs(t.Config)
83
92
        c.Assert(err, IsNil)
84
93
 
130
139
 
131
140
// The following tests need to be enabled once the coding is complete.
132
141
 
133
 
func (s *LiveTests) TestBootstrap(c *C) {
134
 
        c.Skip("Work in progress")
135
 
}
136
 
 
137
 
func (s *LiveTests) TestBootstrapMultiple(c *C) {
138
 
        c.Skip("Work in progress")
139
 
}
140
 
 
141
142
func (s *LiveTests) TestGlobalPorts(c *C) {
142
143
        c.Skip("Work in progress")
143
144
}