Documentation

Index

Constants

View Source
const (
	HasSecrets = true
	NoSecrets  = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAddresserFacade

type APIAddresserFacade interface {
	APIAddresses() ([]string, error)
	CACert() (string, error)
	APIHostPorts() ([][]network.HostPort, error)
	WatchAPIHostPorts() (watcher.NotifyWatcher, error)
}

type APIAddresserTests

type APIAddresserTests struct {
	// contains filtered or unexported fields
}

func NewAPIAddresserTests

func NewAPIAddresserTests(facade APIAddresserFacade, st *state.State) *APIAddresserTests

func (*APIAddresserTests) TestAPIAddresses

func (s *APIAddresserTests) TestAPIAddresses(c *gc.C)

func (*APIAddresserTests) TestAPIHostPorts

func (s *APIAddresserTests) TestAPIHostPorts(c *gc.C)

func (*APIAddresserTests) TestCACert

func (s *APIAddresserTests) TestCACert(c *gc.C)

func (*APIAddresserTests) TestWatchAPIHostPorts

func (s *APIAddresserTests) TestWatchAPIHostPorts(c *gc.C)

type ClearableCookieJar

type ClearableCookieJar struct {
	// contains filtered or unexported fields
}

    ClearableCookieJar implements a cookie jar that can be cleared of all cookies for testing purposes.

    func NewClearableCookieJar

    func NewClearableCookieJar() *ClearableCookieJar

      NewClearableCookieJar returns a new ClearableCookieJar.

      func (*ClearableCookieJar) Clear

      func (jar *ClearableCookieJar) Clear()

        Clear clears all the cookies in the jar. It is not OK to call Clear concurrently with the other methods.

        func (*ClearableCookieJar) Cookies

        func (jar *ClearableCookieJar) Cookies(u *url.URL) []*http.Cookie

          Cookies implements http.CookieJar.Cookies.

          func (*ClearableCookieJar) SetCookies

          func (jar *ClearableCookieJar) SetCookies(u *url.URL, cookies []*http.Cookie)

            Cookies implements http.CookieJar.SetCookies.

            type MacaroonSuite

            type MacaroonSuite struct {
            	jujutesting.JujuConnSuite
            
            	// DischargerLogin is called by the discharger when an
            	// API macaroon is discharged. It should either return
            	// the chosen username or an empty string, in which case
            	// the discharge is denied.
            	// If this is nil, func() {return ""} is implied.
            	DischargerLogin func() string
            	// contains filtered or unexported fields
            }

              MacaroonSuite wraps a JujuConnSuite with macaroon authentication enabled.

              func (*MacaroonSuite) APIInfo

              func (s *MacaroonSuite) APIInfo(c *gc.C) *api.Info

                APIInfo returns API connection info suitable for connecting to the API using macaroon authentication.

                func (*MacaroonSuite) AddModelUser

                func (s *MacaroonSuite) AddModelUser(c *gc.C, username string)

                  AddModelUser is a convenience function that adds an external user to the current model. It will panic if the user name is local.

                  func (*MacaroonSuite) OpenAPI

                  func (s *MacaroonSuite) OpenAPI(c *gc.C, info *api.Info, jar http.CookieJar) api.Connection

                    OpenAPI opens a connection to the API using the given information. and empty DialOpts. If info is nil, s.APIInfo(c) is used. If jar is non-nil, it will be used as the store for the cookies created as a result of API interaction.

                    func (*MacaroonSuite) SetUpTest

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

                    func (*MacaroonSuite) TearDownTest

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

                    type ModelWatcherFacade

                    type ModelWatcherFacade interface {
                    	WatchForModelConfigChanges() (watcher.NotifyWatcher, error)
                    	ModelConfig() (*config.Config, error)
                    }

                    type ModelWatcherTests

                    type ModelWatcherTests struct {
                    	// contains filtered or unexported fields
                    }

                    func NewModelWatcherTests

                    func NewModelWatcherTests(
                    	facade ModelWatcherFacade,
                    	st *state.State,
                    	hasSecrets bool) *ModelWatcherTests

                    func (*ModelWatcherTests) TestModelConfig

                    func (s *ModelWatcherTests) TestModelConfig(c *gc.C)

                    func (*ModelWatcherTests) TestWatchForModelConfigChanges

                    func (s *ModelWatcherTests) TestWatchForModelConfigChanges(c *gc.C)