Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(366)

Side by Side Diff: identity/userpass_test.go

Issue 6844087: goose: all current code
Patch Set: Created 12 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 package identity
2
3 import (
4 . "launchpad.net/gocheck"
5 "launchpad.net/goose/testing/httpsuite"
6 "launchpad.net/goose/testservices/identityservice"
7 )
8
9 type UserPassTestSuite struct {
10 httpsuite.HTTPSuite
11 }
12
13 var _ = Suite(&UserPassTestSuite{})
14
15 func (s *UserPassTestSuite) TestAuthAgainstServer(c *C) {
16 service := identityservice.NewUserPass()
17 s.Mux.Handle("/", service)
18 token := service.AddUser("joe-user", "secrets")
19 var l Authenticator = &UserPass{}
20 creds := Credentials{User: "joe-user", URL: s.Server.URL, Secrets: "secr ets"}
21 auth, err := l.Auth(creds)
22 c.Assert(err, IsNil)
23 c.Assert(auth.Token, Equals, token)
24 // c.Assert(auth.ServiceURLs, DeepEquals, map[string]string{"compute": " http://management/url"})
25 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b