testutil

package
v0.3.0-alpha15 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanAllTables

func CleanAllTables(db *gorm.DB) error

CleanAllTables Drops all tables

func CreateBlackTeam

func CreateBlackTeam(db *gorm.DB) (err error)

CreateBlackTeam Ensures that black team exists

func CreatePolicy

func CreatePolicy(db *gorm.DB) (*policy.Policy, error)

CreatePolicy Ensure policy.Policy exists

func DataPreload

func DataPreload(db *gorm.DB)

func DropDB

func DropDB(db *gorm.DB, c config.StaticConfig)

func SetupCockroachDB

func SetupCockroachDB(c storage.Config) *gorm.DB

SetupCockroachDB creates a new database instance using

func TruncateAllTables

func TruncateAllTables(db *gorm.DB)

TruncateAllTables truncates all tables (A little faster than dropping)

func TruncateTable

func TruncateTable(ctx context.Context, v interface{}, db *gorm.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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