featurecontext

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.3.0

type Config struct {
	Endpoint              string
	HttpInsecure          bool
	GrpcTLSMode           string
	AsyncPropagation      bool
	AsyncPropagationDelay time.Duration
}

type FeatureContext

type FeatureContext struct {
	Client     gateway.GatewayAPIClient
	HTTPClient http.Client
	Config     Config

	// remember the last response to check the outcome
	Response interface{}

	// remember created resources to access them later
	Users              map[string]User
	PublicSharesToken  map[string]string
	ResourceReferences map[string]ResourceAlias

	// remember created resources for deprovisioning
	// if they change during the test runs, we do not need to clean up
	CreatedSpaces             []*providerv1beta1.StorageSpace
	CreatedResourceReferences []*providerv1beta1.Reference
}

FeatureContext holds values which are used across test steps

func (*FeatureContext) GetAuthContext

func (f *FeatureContext) GetAuthContext(u string) (context.Context, error)

GetAuthContext uses the access token from the Feature Context to create a context for the cs3api request

func (*FeatureContext) GetHomeSpace

func (f *FeatureContext) GetHomeSpace(user string) (*providerv1beta1.StorageSpace, error)

GetHomeSpace finds the personal space of the user

func (*FeatureContext) GetPublicShareToken

func (f *FeatureContext) GetPublicShareToken(publicShare string) (string, error)

func (*FeatureContext) Init

func (f *FeatureContext) Init(cfg Config)

type ResourceAlias

type ResourceAlias struct {
	Ref  *providerv1beta1.Reference
	Info *providerv1beta1.ResourceInfo
}

type User

type User struct {
	RevaToken string
	User      *userv1beta1.User
}

User for remembering in the feature context

Jump to

Keyboard shortcuts

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