Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelperTestView ¶ added in v0.10.7
func HelperTestView(t *testing.T, resource ViewTestCase)
func TestResource ¶
func TestResource(t *testing.T, resource ResourceTestCase)
Types ¶
type ResourceTestCase ¶ added in v0.6.0
type ResourceTestCase struct { Provider *provider.Provider Config string // we want it to be parallel by default NotParallel bool // ParallelFetchingLimit limits parallel resources fetch at a time ParallelFetchingLimit uint64 // SkipIgnoreInTest flag which detects if schema.Table or schema.Column should be ignored SkipIgnoreInTest bool // Verifiers are map from resource name to its verifiers. // If no verifiers specified for resource (resource name is not in key set of map), // non emptiness check of all columns in table and its relations will be performed. Verifiers map[string][]Verifier }
type Verifier ¶ added in v0.8.19
type Verifier func(t *testing.T, table *schema.Table, conn pgxscan.Querier, shouldSkipIgnoreInTest bool)
Verifier verifies tables specified by table schema (main table and its relations).
func VerifyAtLeastOneRow ¶ added in v0.8.19
func VerifyAtLeastOneRow() Verifier
VerifyAtLeastOneRow verifies that main table from schema has at least one row
func VerifyAtMostOneOf ¶ added in v0.8.19
VerifyAtMostOneOf verifies that for each row in table at most one column from oneof is not empty
func VerifyNoEmptyColumnsExcept ¶ added in v0.8.19
VerifyNoEmptyColumnsExcept verifies that for each row in table its columns are not empty except passed
type ViewTestCase ¶ added in v0.10.7
Click to show internal directories.
Click to hide internal directories.