Documentation ¶
Index ¶
- func CreateTempfile(tb testing.TB, b []byte) *os.File
- func DeleteTempfile(f *os.File, t *testing.T)
- func WaitForContents(t *testing.T, d time.Duration, p, c string)
- type Tenancy
- type TenancyHelper
- func (t *TenancyHelper) AppendTenancyInfo(name string, tenancy *Tenancy) string
- func (t *TenancyHelper) GenerateDefaultTenancyTests(generationFunc func(tenancy *Tenancy) []interface{}) []interface{}
- func (t *TenancyHelper) GenerateNonDefaultTenancyTests(generationFunc func(tenancy *Tenancy) []interface{}) []interface{}
- func (t *TenancyHelper) GenerateTenancyTests(generationFunc func(tenancy *Tenancy) []interface{}) []interface{}
- func (t *TenancyHelper) GetUniquePartitions() map[api.Partition]interface{}
- func (t *TenancyHelper) IsConsulEnterprise() bool
- func (t *TenancyHelper) RunWithTenancies(testFunc func(tenancy *Tenancy), test *testing.T, testName string)
- func (t *TenancyHelper) Tenancy(s string) *Tenancy
- func (t *TenancyHelper) TestTenancies() []*Tenancy
- type TestingTB
- func (t *TestingTB) Cleanup(f func())
- func (t *TestingTB) DoCleanup()
- func (*TestingTB) Error(...any)
- func (*TestingTB) Errorf(string, ...any)
- func (*TestingTB) Fail()
- func (*TestingTB) FailNow()
- func (*TestingTB) Failed() bool
- func (*TestingTB) Fatal(...any)
- func (*TestingTB) Fatalf(string, ...interface{})
- func (*TestingTB) Helper()
- func (*TestingTB) Log(...any)
- func (*TestingTB) Logf(string, ...interface{})
- func (*TestingTB) Name() string
- func (*TestingTB) Setenv(string, string)
- func (*TestingTB) TempDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempfile ¶
CreateTempfile that will be closed and removed at the end of the test.
Types ¶
type TenancyHelper ¶ added in v0.37.0
type TenancyHelper struct {
// contains filtered or unexported fields
}
func NewTenancyHelper ¶ added in v0.37.0
func NewTenancyHelper(consulClient *api.Client) (*TenancyHelper, error)
func (*TenancyHelper) AppendTenancyInfo ¶ added in v0.37.0
func (t *TenancyHelper) AppendTenancyInfo(name string, tenancy *Tenancy) string
func (*TenancyHelper) GenerateDefaultTenancyTests ¶ added in v0.37.0
func (t *TenancyHelper) GenerateDefaultTenancyTests(generationFunc func(tenancy *Tenancy) []interface{}) []interface{}
func (*TenancyHelper) GenerateNonDefaultTenancyTests ¶ added in v0.37.0
func (t *TenancyHelper) GenerateNonDefaultTenancyTests(generationFunc func(tenancy *Tenancy) []interface{}) []interface{}
func (*TenancyHelper) GenerateTenancyTests ¶ added in v0.37.0
func (t *TenancyHelper) GenerateTenancyTests(generationFunc func(tenancy *Tenancy) []interface{}) []interface{}
func (*TenancyHelper) GetUniquePartitions ¶ added in v0.37.0
func (t *TenancyHelper) GetUniquePartitions() map[api.Partition]interface{}
func (*TenancyHelper) IsConsulEnterprise ¶ added in v0.37.0
func (t *TenancyHelper) IsConsulEnterprise() bool
func (*TenancyHelper) RunWithTenancies ¶ added in v0.37.0
func (t *TenancyHelper) RunWithTenancies(testFunc func(tenancy *Tenancy), test *testing.T, testName string)
func (*TenancyHelper) Tenancy ¶ added in v0.37.0
func (t *TenancyHelper) Tenancy(s string) *Tenancy
Tenancy constructs a Tenancy from a concise string representation suitable for use in unit tests.
- "" : partition="" namespace="" - "foo" : partition="foo" namespace="" - "foo.bar" : partition="foo" namespace="bar" - <others> : partition="BAD" namespace="BAD"
func (*TenancyHelper) TestTenancies ¶ added in v0.37.0
func (t *TenancyHelper) TestTenancies() []*Tenancy
TestTenancies returns a list of tenancies which represent the namespace and partition combinations that can be used in unit tests
Click to show internal directories.
Click to hide internal directories.