Documentation
¶
Index ¶
- func RunGenericTests[T Testable](testcases []T, t *testing.T, f func(ctx context.Context, testcase T))
- func RunServicesTests(testCases []ServicesStorageTestCase, t *testing.T, f func(context.Context))
- func RunStorageTests(testCases []StorageTestCase, t *testing.T, f func(context.Context))
- func RunTests(t *testing.T, init func(context.Context), f func(context.Context))
- type ServicesStorageTestCase
- type StorageTestCase
- func TemplateBleveWithPrefix(daoFunc any, prefix string) StorageTestCase
- func TemplateBoltWithPrefix(daoFunc any, prefix string) StorageTestCase
- func TemplateMongoEnvWithPrefix(daoFunc any, prefix string) StorageTestCase
- func TemplateMongoEnvWithPrefixAndIndexerCollection(daoFunc any, prefix, collection string) StorageTestCase
- func TemplateSQL(daoFunc any) []StorageTestCase
- type T
- type Testable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunGenericTests ¶
func RunServicesTests ¶
func RunServicesTests(testCases []ServicesStorageTestCase, t *testing.T, f func(context.Context))
RunServicesTests initialize a runtime and run the tests cases with correct DAOs in context
func RunStorageTests ¶
func RunStorageTests(testCases []StorageTestCase, t *testing.T, f func(context.Context))
RunStorageTests initialize a runtime and run the tests cases with correct DAOs in context
Types ¶
type ServicesStorageTestCase ¶
type StorageTestCase ¶
func TemplateBleveWithPrefix ¶
func TemplateBleveWithPrefix(daoFunc any, prefix string) StorageTestCase
TemplateBleveWithPrefix creates a StorageTestCase for BleveDB
func TemplateBoltWithPrefix ¶
func TemplateBoltWithPrefix(daoFunc any, prefix string) StorageTestCase
TemplateBoltWithPrefix creates a StorageTestCase for BoltDB
func TemplateMongoEnvWithPrefix ¶
func TemplateMongoEnvWithPrefix(daoFunc any, prefix string) StorageTestCase
TemplateMongoEnvWithPrefix creates a StorageTestCase for MongoDB
func TemplateMongoEnvWithPrefixAndIndexerCollection ¶
func TemplateMongoEnvWithPrefixAndIndexerCollection(daoFunc any, prefix, collection string) StorageTestCase
TemplateMongoEnvWithPrefixAndIndexerCollection creates a StorageTestCase for MongoDB
func TemplateSQL ¶
func TemplateSQL(daoFunc any) []StorageTestCase
TemplateSQL returns a single SQL test case with the provided DAO func
Click to show internal directories.
Click to hide internal directories.