test

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){
	"bonsai": providerserver.NewProtocol6WithError(
		provider.New(
			provider.WithVersion(version),
		)(),
	),
}

Functions

func NewApiClient

func NewApiClient() *bonsai.Client

Types

type ClientTestSuite

type ClientTestSuite struct {
	// Assertions embedded here allows all tests to reach through the suite to access assertion methods
	*require.Assertions
	// Suite is the testify/suite used for all HTTP request tests
	suite.Suite

	// Client allows each test to have a reachable *bonsai.Client for testing
	Client *bonsai.Client

	ProtoV6ProviderFactories map[string]func() (tfprotov6.ProviderServer, error)
}

type ProviderMockRequestTestSuite

type ProviderMockRequestTestSuite struct {
	ClientTestSuite
	// contains filtered or unexported fields
}

ProviderMockRequestTestSuite is used for tests where the target endpoints are mocked; allowing for isolating the terraform provider functionality, without requiring live responses from the production Bonsai API.

func (*ProviderMockRequestTestSuite) SetupSuite

func (s *ProviderMockRequestTestSuite) SetupSuite()

type ProviderTestSuite

type ProviderTestSuite struct {
	ClientTestSuite
}

ProviderTestSuite is used for all provider acceptance tests.

func (*ProviderTestSuite) SetupSuite

func (s *ProviderTestSuite) SetupSuite()

Jump to

Keyboard shortcuts

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