Documentation ¶
Index ¶
- Constants
- func AreSameFunc(t *testing.T, expect, have any)
- func AssertEmptyOrEqual(t *testing.T, expect any, got any, msgAndArgs ...any) bool
- func CheckPopulated(input any) error
- func LoadAFile(t *testing.T, fileName string) []byte
- func LogTimeOfTest(t TestT) string
- func MustGetEnvSets(t *testing.T, evs ...[]string) map[string]string
- func MustGetEnvVars(t *testing.T, evs ...string) map[string]string
- func NewContext(t TestT) (context.Context, func())
- func NewE2ESuite(t *testing.T, envSets [][]string, runOnAnyEnv ...string) *e2eSuite
- func NewIntegrationSuite(t *testing.T, envSets [][]string, runOnAnyEnv ...string) *integrationSuite
- func NewLoadSuite(t *testing.T, envSets [][]string, runOnAnyEnv ...string) *loadSuite
- func NewNightlySuite(t *testing.T, envSets [][]string, runOnAnyEnv ...string) *nightlySuite
- func NewRetentionSuite(t *testing.T, envSets [][]string, runOnAnyEnv ...string) *retentionSuite
- func NewUnitSuite(t *testing.T) *unitSuite
- func NilOrZero(input any) bool
- func RunOnAny(t *testing.T, tests ...string)
- func WithContext(t TestT, ctx context.Context) (context.Context, func())
- type Suite
- type TestT
Constants ¶
const ( CorsoCITests = "CORSO_CI_TESTS" CorsoE2ETests = "CORSO_E2E_TESTS" CorsoLoadTests = "CORSO_LOAD_TESTS" CorsoNightlyTests = "CORSO_NIGHTLY_TESTS" CorsoRetentionTests = "CORSO_RETENTION_TESTS" )
Flags for declaring which scope of tests to run.
Variables ¶
This section is empty.
Functions ¶
func AreSameFunc ¶
AreSameFunc asserts whether the two funcs are the same func.
func AssertEmptyOrEqual ¶
AssertEmptyOrEqual checks either:
- got is nil or the zero value if expected is nil
- expected and got are equal if expected is not nil
func CheckPopulated ¶
CheckPopulated returns an error if input is not fully populated. To be considered fully populated it must be non-zero-valued. For basic types this just means it isn't the zero value. For structs this means that every field is not zero-valued. This check is recursive for structs.
func LogTimeOfTest ¶
LogTimeOfTest logs the test name and the time that it was run.
func MustGetEnvSets ¶
MustGetEnvSls retrieves the provided env vars from the os. Retrieved values are populated into the resulting map. If any of the env values are zero length, the test errors.
func MustGetEnvVars ¶
MustGetEnvVars retrieves the provided env vars from the os. Retrieved values are populated into the resulting map. If any of the env values are zero length, the test errors.
func NewContext ¶
func NewE2ESuite ¶
func NewIntegrationSuite ¶
func NewLoadSuite ¶
func NewNightlySuite ¶
func NewRetentionSuite ¶
func NewUnitSuite ¶
func NilOrZero ¶
NilOrZero return true if the input is nil or if it's the zero value for the type. If the input is a struct then all fields are recursively checked to see if they're the zero value for their type.