internal

package
v1.1.0-beta.0...-33f0727 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDB

func AddDB(t testing.TB, store kv.Storage, dbInfo *model.DBInfo)

AddDB add mock db for testing.

func AddResourceGroup

func AddResourceGroup(t *testing.T, store kv.Storage, group *model.ResourceGroupInfo)

AddResourceGroup add mock resource group for testing.

func AddTable

func AddTable(t testing.TB, store kv.Storage, dbID int64, tblInfo *model.TableInfo)

AddTable add mock table for testing.

func CreateAutoIDRequirement

func CreateAutoIDRequirement(t testing.TB, opts ...mockstore.MockTiKVStoreOption) autoid.Requirement

CreateAutoIDRequirement create autoid requirement for testing.

func CreateAutoIDRequirementWithStore

func CreateAutoIDRequirementWithStore(t testing.TB, store kv.Storage) autoid.Requirement

CreateAutoIDRequirementWithStore create autoid requirement with storage for testing.

func CreatePolicy

func CreatePolicy(t *testing.T, store kv.Storage, policy *model.PolicyInfo)

CreatePolicy create mock policy for testing.

func DropDB

func DropDB(t testing.TB, store kv.Storage, dbInfo *model.DBInfo)

DropDB drop mock db for testing.

func DropPolicy

func DropPolicy(t *testing.T, store kv.Storage, policy *model.PolicyInfo)

DropPolicy drop mock policy for testing.

func DropResourceGroup

func DropResourceGroup(t *testing.T, store kv.Storage, group *model.ResourceGroupInfo)

DropResourceGroup drop mock resource group for testing.

func DropTable

func DropTable(t testing.TB, store kv.Storage, dbInfo *model.DBInfo, tblID int64, tblName string)

DropTable drop mock table for testing.

func GenGlobalID

func GenGlobalID(store kv.Storage) (int64, error)

GenGlobalID generates next id globally for testing.

func MockDBInfo

func MockDBInfo(t testing.TB, store kv.Storage, DBName string) *model.DBInfo

MockDBInfo mock DBInfo for testing.

func MockPolicyInfo

func MockPolicyInfo(t *testing.T, store kv.Storage, policyName string) *model.PolicyInfo

MockPolicyInfo mock policy for testing.

func MockPolicyRefInfo

func MockPolicyRefInfo(t *testing.T, store kv.Storage, policyName string) *model.PolicyRefInfo

MockPolicyRefInfo mock policy ref info for testing.

func MockResourceGroupInfo

func MockResourceGroupInfo(t *testing.T, store kv.Storage, groupName string) *model.ResourceGroupInfo

MockResourceGroupInfo mock resource group for testing.

func MockTable

func MockTable(t *testing.T, store kv.Storage, tblInfo *model.TableInfo) table.Table

MockTable mock table for testing.

func MockTableInfo

func MockTableInfo(t testing.TB, store kv.Storage, tblName string) *model.TableInfo

MockTableInfo mock TableInfo for testing.

func PrepareSlowLogfile

func PrepareSlowLogfile(t *testing.T, slowLogFileName string)

PrepareSlowLogfile prepares a slow log file for test.

func Sizeof

func Sizeof(v any) int

Sizeof returns the size of 'v' in bytes. If there is an error during calculation, Of returns -1.

func UpdateDB

func UpdateDB(t testing.TB, store kv.Storage, dbInfo *model.DBInfo)

UpdateDB update mock db for testing.

func UpdatePolicy

func UpdatePolicy(t *testing.T, store kv.Storage, policy *model.PolicyInfo)

UpdatePolicy update mock policy for testing.

func UpdateResourceGroup

func UpdateResourceGroup(t *testing.T, store kv.Storage, group *model.ResourceGroupInfo)

UpdateResourceGroup update mock resource group for testing.

func UpdateTable

func UpdateTable(t *testing.T, store kv.Storage, dbInfo *model.DBInfo, tblInfo *model.TableInfo)

UpdateTable update mock table for testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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