~gz/goose/novaservice_preserve_negative_ports

« back to all changes in this revision

Viewing changes to identity/local_test.go

  • Committer: Ian Booth
  • Date: 2013-02-08 02:23:27 UTC
  • mto: This revision was merged to the branch mainline in revision 68.
  • Revision ID: ian.booth@canonical.com-20130208022327-lpakgw1vv5kpkjmo
Add region matching tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
        "launchpad.net/goose/testservices/openstackservice"
7
7
        "net/http"
8
8
        "net/http/httptest"
 
9
        "net/url"
9
10
)
10
11
 
11
12
func registerLocalTests() {
36
37
                URL:        s.Server.URL,
37
38
                User:       "fred",
38
39
                Secrets:    "secret",
39
 
                Region:     "some region",
 
40
                Region:     "zone1.some region",
40
41
                TenantName: "tenant",
41
42
        }
42
43
        openstack := openstackservice.New(s.cred)
61
62
}
62
63
 
63
64
// Additional tests to be run against the service double only go here.
 
65
 
 
66
// Test service lookup with inexact region matching.
 
67
func (s *localLiveSuite) TestServiceLookup(c *C) {
 
68
        s.client.Authenticate()
 
69
        serviceURL, err := s.client.MakeServiceURL("compute", []string{})
 
70
        c.Assert(err, IsNil)
 
71
        _, err = url.Parse(serviceURL)
 
72
        c.Assert(err, IsNil)
 
73
        serviceURL, err = s.client.MakeServiceURL("object-store", []string{})
 
74
        c.Assert(err, IsNil)
 
75
        _, err = url.Parse(serviceURL)
 
76
        c.Assert(err, IsNil)
 
77
}