testbench

package
v0.6.34 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

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

	DefaultServiceDataProjectName = "system"
)

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 BootstrapResource added in v0.6.22

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

func BootstrapServiceDataKey added in v0.6.29

func BootstrapServiceDataKey(ctx context.Context, cl shieldv1beta1.ServiceDataServiceClient, creatorEmail, defaultServiceDataProjectName, testDataPath string) error

func BootstrapUser

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

func BootstrapUserServiceData added in v0.6.29

func BootstrapUserServiceData(ctx context.Context, cl shieldv1beta1.ServiceDataServiceClient, userID, creatorEmail, defaultServiceDataProjectName, testDataPath string) error

func CreateClient

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

func CreateServiceDataClient added in v0.6.22

func CreateServiceDataClient(ctx context.Context, host string) (shieldv1beta1.ServiceDataServiceClient, 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

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