Merge lp:~wallyworld/goose/simplestreams-endpoint into lp:goose
Proposed by
Ian Booth
Status: | Merged |
---|---|
Approved by: | Ian Booth |
Approved revision: | 92 |
Merged at revision: | 91 |
Proposed branch: | lp:~wallyworld/goose/simplestreams-endpoint |
Merge into: | lp:goose |
Diff against target: |
55 lines (+24/-0) 2 files modified
identity/local_test.go (+12/-0) testservices/openstackservice/openstack.go (+12/-0) |
To merge this branch: | bzr merge lp:~wallyworld/goose/simplestreams-endpoint |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+162918@code.launchpad.net |
Commit message
Add product-streams endpoint to test service
The keystone catalog of the service double needs to have the product streams
endpoint included so that juju-core tests can use it.
Description of the change
Add product-streams endpoint to test service
The keystone catalog of the service double needs to have the product streams
endpoint included so that juju-core tests can use it.
To post a comment you must log in.
Reviewers: mp+162918_ code.launchpad. net,
Message:
Please take a look.
Description:
Add product-streams endpoint to test service
The keystone catalog of the service double needs to have the product
streams
endpoint included so that juju-core tests can use it.
https:/ /code.launchpad .net/~wallyworl d/goose/ simplestreams- endpoint/ +merge/ 162918
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/9295043/
Affected files: local_test. go openstackservic e/openstack. go
A [revision details]
M identity/
M testservices/
Index: [revision details] 20130425123821- 5bpn7goznnibt0u z
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: identity/ local_test. go local_test. go' local_test. go 2013-02-12 01:47:38 +0000 local_test. go 2013-05-08 02:25:45 +0000 net/goose/ testservices/ openstackservic e" http/httptest"
=== modified file 'identity/
--- identity/
+++ identity/
@@ -6,6 +6,8 @@
"launchpad.
"net/http"
"net/
+ "net/url"
+ "strings"
)
func registerLocalTe sts() {
@@ -61,3 +63,13 @@
}
// Additional tests to be run against the service double only go here. amsEndpoint( c *C) { Authenticate( ) MakeServiceURL( "product- streams" , nil) serviceURL) strings. HasSuffix( serviceURL, "/imagemetadata"), Equals, true)
+
+func (s *localLiveSuite) TestProductStre
+ err := s.client.
+ c.Assert(err, IsNil)
+ serviceURL, err := s.client.
+ c.Assert(err, IsNil)
+ _, err = url.Parse(
+ c.Assert(err, IsNil)
+ c.Assert(
+}
Index: testservices/ openstackservic e/openstack. go openstackservic e/openstack. go' openstackservic e/openstack. go 2013-02-08 02:23:27 +0000 openstackservic e/openstack. go 2013-05-08 02:26:12 +0000
=== modified file 'testservices/
--- testservices/
+++ testservices/
@@ -1,6 +1,7 @@
package openstackservice
import ( net/goose/ identity" net/goose/ testservices/ identityservice " net/goose/ testservices/ novaservice" Split(cred. Region, ".") len(regionParts )-1] New(cred. URL, "v1", userInfo.TenantId, Swift.AddContai ner("imagemetad ata") Errorf( "setting up image metadata container: %v", err)) Swift.Endpoints ()[0].PublicURL .Service{ "simplestreams" , "product-streams", ce.Endpoint{ .Endpoint{ PublicURL: url + "/imagemetadata", Region: Identity. (*identityservi ce.UserPass) .AddService( serviceDef)
+ "fmt"
"launchpad.
"launchpad.
"launchpad.
@@ -31,6 +32,17 @@
regionParts := strings.
baseRegion := regionParts[
openstack.Swift = swiftservice.
baseRegion, openstack.Identity)
+ // Create container and add image metadata endpoint so that
product-streams URLs are included
+ // in the keystone catalog.
+ err := openstack.
+ if err != nil {
+ panic(fmt.
+ }
+ url := openstack.
+ serviceDef := identityservice
[]identityservi
+ identityservice
cred.Region},
+ }}
+ openstack.
return &openstack
}