jujutest

package
v0.0.0-...-0a271de Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 21 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AdminSecret = "admin-secret"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tests

type Tests struct {
	TestConfig     coretesting.Attrs
	Credential     cloud.Credential
	CloudEndpoint  string
	CloudRegion    string
	ControllerUUID string
	Env            environs.Environ
	envtesting.ToolsFixture
	sstesting.TestDataSuite

	// ControllerStore holds the controller related information
	// such as controllers, accounts, etc., used when preparing
	// the environment. This is initialized by SetUpSuite.
	ControllerStore jujuclient.ClientStore

	// ProviderCallContext holds the context to be used to make
	// calls to a cloud provider.
	ProviderCallContext envcontext.ProviderCallContext

	// BootstrapContext holds the context to bootstrap a test environment.
	BootstrapContext environs.BootstrapContext
	// contains filtered or unexported fields
}

Tests is a gocheck suite containing tests verifying juju functionality against the environment with the given configuration. The tests are not designed to be run against a live server - the Environ is opened once for each test, and some potentially expensive operations may be executed.

func (*Tests) AssertPrepareFailsWithConfig

func (t *Tests) AssertPrepareFailsWithConfig(c *gc.C, badConfig coretesting.Attrs, errorMatches string) error

func (*Tests) CloudSpec

func (t *Tests) CloudSpec() environscloudspec.CloudSpec

func (*Tests) Open

func (t *Tests) Open(c *gc.C, ctx context.Context, cfg *config.Config) environs.Environ

Open opens an instance of the testing environment.

func (*Tests) Prepare

func (t *Tests) Prepare(c *gc.C) environs.Environ

Prepare prepares an instance of the testing environment.

func (*Tests) PrepareParams

func (t *Tests) PrepareParams(c *gc.C) bootstrap.PrepareParams

PrepareParams returns the environs.PrepareParams that will be used to call environs.Prepare.

func (*Tests) PrepareWithParams

func (t *Tests) PrepareWithParams(c *gc.C, params bootstrap.PrepareParams) environs.Environ

PrepareWithParams prepares an instance of the testing environment.

func (*Tests) SetUpTest

func (t *Tests) SetUpTest(c *gc.C)

func (*Tests) TearDownTest

func (t *Tests) TearDownTest(c *gc.C)

func (*Tests) TestBootstrap

func (t *Tests) TestBootstrap(c *gc.C)

func (*Tests) TestStartStop

func (t *Tests) TestStartStop(c *gc.C)

Jump to

Keyboard shortcuts

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