lp://staging/~gophers/goose/trunk
- Get this branch:
- bzr branch lp://staging/~gophers/goose/trunk
Branch merges
- Go Bot: Pending requested
-
Diff: 2525 lines (+1013/-609)32 files modifiedclient/local_test.go (+15/-22)
identity/legacy_test.go (+3/-3)
identity/live_test.go (+40/-0)
identity/local_test.go (+63/-0)
identity/setup_test.go (+13/-1)
identity/userpass.go (+4/-0)
identity/userpass_test.go (+5/-5)
nova/local_test.go (+12/-32)
swift/local_test.go (+12/-28)
test.py (+1/-0)
testservices/cmd/main.go (+4/-3)
testservices/identityservice/identityservice.go (+11/-5)
testservices/identityservice/legacy.go (+17/-9)
testservices/identityservice/legacy_test.go (+3/-2)
testservices/identityservice/service_test.go (+3/-3)
testservices/identityservice/userpass.go (+18/-17)
testservices/identityservice/userpass_test.go (+17/-22)
testservices/identityservice/users.go (+63/-0)
testservices/identityservice/util.go (+4/-2)
testservices/novaservice/service.go (+46/-24)
testservices/novaservice/service_http.go (+16/-9)
testservices/novaservice/service_http_test.go (+343/-334)
testservices/novaservice/service_test.go (+16/-17)
testservices/openstack/openstack.go (+38/-0)
testservices/service.go (+21/-0)
testservices/swiftservice/service.go (+46/-8)
testservices/swiftservice/service_http.go (+13/-7)
testservices/swiftservice/service_http_test.go (+14/-9)
testservices/swiftservice/service_test.go (+8/-7)
testservices/swiftservice/swiftservice.go (+0/-40)
tools/secgroup-delete-all/main.go (+73/-0)
tools/secgroup-delete-all/main_test.go (+71/-0)
Branch information
Recent revisions
- 60. By John A Meinel
-
test.py: add --juju-core flag
Add the ability to run the juju-core test suite as part of
landing changes to trunk.
<email address hidden> - 58. By Dimiter Naydenov
-
nova: Fix RunServer userdata encoding
According to the go docs, []byte fields are automatically serialized as
base64 encoded strings, so no need to do it twice (and post-bootstrap
fails due to this). - 57. By Dimiter Naydenov
-
trivial: better nova comments
Follow-up on https:/
/codereview. appspot. com/7228058/, adding better
comments on the Nova ServerDetail struct's fields.R=rog
CC=
https://codereview. appspot. com/7235058 - 56. By Dimiter Naydenov
-
nova: Addresses in ServerDetail
Implemented handling of public/private addresses map inside ServerDetail.
Added tests in the double to check RunServer sets the appropriate addresses.
We need this in juju-core to get the IP address of an instance.R=wallyworld, rog, gz
CC=
https://codereview. appspot. com/7228058 - 55. By Ian Booth
-
Rewrite rate limit retry tests
This branch uses the new service double control hooks introduced in the previous branch to rewrite the tests which check that rate limit exceeded retries are handled properly.
The kludge used previously to induce a retry error has been removed, and now an additional test can also be easily added to check the behaviour if too many rate limit retry responses are received.So that the tests run fast, I've allowed for the Retry-After header value to be a float (even though a real instance only assigns an int). This means the tests can specify a really
short retry time (I used 1ms).I've also re-added a rate limit retry test for use with the live instance, but improved it so that it exists as soon as the first rate limit exceeded response is received.
R=jameinel
CC=
https://codereview. appspot. com/7200049 - 54. By Ian Booth
-
Error testing infrastructure for service doubles
This branch provides infrastructure to allow tests to specify that the service
doubles should return an error at various points.
The basic premise is that the test provides a hook which is run at the specfied point in time eg when a specific function runs.
The hook is passed the service double and any function arguments. It can inspect the state of the service and the function args and
can decide to return an error if it wants to.The diff conatins a practical example of this being used - 3 security groups are
created and an error is raised when the second one is deleted.This work doesn't have to be used to raise an error - the hook can also be used to modify the sate of the service double and simply exit without error.
R=jameinel
CC=
https://codereview. appspot. com/7204055 - 51. By Ian Booth
-
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", []identityservi ce.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", []identityservi ce.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
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)