idptest

package
v1.0.0-alpha4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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

func (s *Suite) AssertLoginFailureMatches(c *gc.C, regex string)

AssertLoginFailure asserts taht the login test has resulted in a failure with an error that matches the given regex.

func (*Suite) AssertLoginNotComplete

func (s *Suite) AssertLoginNotComplete(c *gc.C)

AssertLoginNotComplete asserts that the login attempt has not yet completed.

func (*Suite) AssertLoginSuccess

func (s *Suite) AssertLoginSuccess(c *gc.C, username string)

AssertLoginSuccess asserts that the login test has resulted in a successful login of the given user.

func (*Suite) AssertUser

func (s *Suite) AssertUser(c *gc.C, id *store.Identity) *store.Identity

AssertUser asserts that the specified user is stored in the store. It returns the stored identity.

func (*Suite) InitParams

func (s *Suite) InitParams(c *gc.C, prefix string) idp.InitParams

InitParams returns a completed InitParams that a test can use to pass to idp.Init.

func (*Suite) SetUpTest

func (s *Suite) SetUpTest(c *gc.C)

func (*Suite) TearDownTest

func (s *Suite) TearDownTest(c *gc.C)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL