70
|
|
|
Martin Packman |
11 years ago
|
|
|
69
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
68
|
|
|
Ian Booth |
11 years ago
|
|
|
67
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
66
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
65
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
64
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
63
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
62
|
|
|
Ian Booth |
11 years ago
|
|
|
61
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
60
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
59
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
58
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
57
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
56
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
55
|
|
|
Ian Booth |
11 years ago
|
|
|
54
|
|
|
Ian Booth |
11 years ago
|
|
|
53
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
52
|
|
|
John Arbash Meinel |
11 years ago
|
|
|
51
|
|
Goose test infrastructure improvements
This branch improves the usabilty of the goose test infrastructure.
A full Openstack service test double is provided. A bunch of manual coding which was required in each test suite to set up various Openstack module test doubles is replaced by a few lines of code.
New code:
cred := &identity.Credentials{...} openstack := openstack.New(cred) openstack.SetupHTTP(s.Mux)
Old code:
// Create the identity service. s.identityDouble = identityservice.NewUserPass() token := s.identityDouble.AddUser(s.cred.User, s.cred.Secrets) s.Mux.Handle(baseIdentityURL, s.identityDouble)
// Register Swift endpoints with identity service. ep := identityservice.Endpoint{ AdminURL: s.Server.URL + baseSwiftURL, InternalURL: s.Server.URL + baseSwiftURL, PublicURL: s.Server.URL + baseSwiftURL, Region: s.cred.Region, } service := identityservice.Service{"swift", "object-store", []identityservice.Endpoint{ep}} s.identityDouble.AddService(service) s.swiftDouble = swiftservice.New("localhost", baseSwiftURL+"/", token) s.Mux.Handle(baseSwiftURL+"/", s.swiftDouble)
// Register Nova endpoints with identity service. ep = identityservice.Endpoint{ AdminURL: s.Server.URL + baseNovaURL, InternalURL: s.Server.URL + baseNovaURL, PublicURL: s.Server.URL + baseNovaURL, Region: s.cred.Region, } service = identityservice.Service{"nova", "compute", []identityservice.Endpoint{ep}} s.identityDouble.AddService(service) s.novaDouble = novaservice.New("localhost", "V1", token, "1") s.novaDouble.SetupHTTP(s.Mux) Other changes include:
- fix the identity service double to remove the hard coded userId and tenantId. - do not hard code a fixed token against a service double - each user is assigned their own token just like a real instance, allowing multi-user tests to be written. - improvements to the Swift service double to make it use URLs which are compliant with how a real Swift instance would do it. - factor out a common base class for the legacy and userpass double implementations. - use a SetupHTTP() for all test doubles instead of requiring the coder to know the magic URL paths to use.
R=dimitern CC= https://codereview.appspot.com/7194043
|
Ian Booth |
11 years ago
|
|
|