testbench

package
v0.6.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OrgAdminEmail      = "admin1-group1-org1@gotocompany.com"
	DefaultSystemEmail = "shield-service@gotocompany.com"
	IdentityHeader     = "X-Shield-Email"
)

Variables

View Source
var (
	RuleCacheRefreshDelay = time.Minute * 2
)

Functions

func AssignGroupManager added in v0.6.6

func AssignGroupManager(ctx context.Context, cl shieldv1beta1.ShieldServiceClient, creatorEmail string) error

func BootstrapGroup

func BootstrapGroup(ctx context.Context, cl shieldv1beta1.ShieldServiceClient, creatorEmail string, testDataPath string) error

func BootstrapMetadataKey

func BootstrapMetadataKey(ctx context.Context, cl shieldv1beta1.ShieldServiceClient, creatorEmail string, testDataPath string) error

func BootstrapOrganization

func BootstrapOrganization(ctx context.Context, cl shieldv1beta1.ShieldServiceClient, creatorEmail string, testDataPath string) error

func BootstrapProject

func BootstrapProject(ctx context.Context, cl shieldv1beta1.ShieldServiceClient, creatorEmail string, testDataPath string) error

func BootstrapUser

func BootstrapUser(ctx context.Context, cl shieldv1beta1.ShieldServiceClient, creatorEmail string, testDataPath string) error

func CreateClient

func CreateClient(ctx context.Context, host string) (shieldv1beta1.ShieldServiceClient, func(), error)

func GetFreePort

func GetFreePort() (int, error)

func SetupDB

func SetupDB(cfg db.Config) (dbc *db.Client, err error)

func SetupTests added in v0.6.5

func SetupTests(t *testing.T) (shieldv1beta1.ShieldServiceClient, *config.Shield, func(), func())

Types

type TestBench

type TestBench struct {
	PGConfig      db.Config
	SpiceDBConfig spicedb.Config
	// contains filtered or unexported fields
}

func (*TestBench) CleanUp

func (te *TestBench) CleanUp() error

Jump to

Keyboard shortcuts

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