Documentation ¶
Index ¶
- type Suite
- func (s *Suite) AssertLoginFailureMatches(c *gc.C, regex string)
- func (s *Suite) AssertLoginNotComplete(c *gc.C)
- func (s *Suite) AssertLoginSuccess(c *gc.C, username string)
- func (s *Suite) AssertUser(c *gc.C, id *store.Identity) *store.Identity
- func (s *Suite) InitParams(c *gc.C, prefix string) idp.InitParams
- func (s *Suite) SetUpTest(c *gc.C)
- func (s *Suite) TearDownTest(c *gc.C)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Suite ¶
type Suite struct { candidtest.StoreSuite // Template contains a template that will be passed in the // idp.InitParams. Template *template.Template // Ctx contains a context.Context that has been initialised with // the stores. Ctx context.Context // Oven contains a bakery.Oven that will be passed in the // idp.InitParams. Tests can use this to mint macaroons if // necessary. Oven *bakery.Oven // contains filtered or unexported fields }
Suite provides a test suite that is helpful for testing identity providers.
func (*Suite) AssertLoginFailureMatches ¶
AssertLoginFailure asserts taht the login test has resulted in a failure with an error that matches the given regex.
func (*Suite) AssertLoginNotComplete ¶
AssertLoginNotComplete asserts that the login attempt has not yet completed.
func (*Suite) AssertLoginSuccess ¶
AssertLoginSuccess asserts that the login test has resulted in a successful login of the given user.
func (*Suite) AssertUser ¶
AssertUser asserts that the specified user is stored in the store. It returns the stored identity.
func (*Suite) InitParams ¶
InitParams returns a completed InitParams that a test can use to pass to idp.Init.
func (*Suite) TearDownTest ¶
Click to show internal directories.
Click to hide internal directories.