test

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessKey

func AccessKey(key *ecdsa.PrivateKey, claims elephantine.JWTClaims) (string, error)

func Claims added in v0.4.6

func Claims(t *testing.T, user string, scope string, units ...string) elephantine.JWTClaims

func IsTwirpError

func IsTwirpError(
	t test.TestingT, err error, code twirp.ErrorCode,
)

func NewSigningKey

func NewSigningKey() (*ecdsa.PrivateKey, error)

func PurgeBackingServices

func PurgeBackingServices() error

func StandardClaims

func StandardClaims(t *testing.T, scope string, units ...string) elephantine.JWTClaims

Types

type BackingServices

type BackingServices struct {
	// contains filtered or unexported fields
}

func GetBackingServices

func GetBackingServices() (*BackingServices, error)

func (*BackingServices) Purge

func (bs *BackingServices) Purge() error

type Environment

type Environment struct {
	S3           *s3.Client
	Bucket       string
	PostgresURI  string
	ReportingURI string
	Migrator     *migrate.Migrator
}

func SetUpBackingServices

func SetUpBackingServices(
	t T,
	instrument *elephantine.HTTPClientInstrumentation,
	skipMigrations bool,
) Environment

type T

type T interface {
	Name() string
	Helper()
	Fatalf(format string, args ...any)
}

Jump to

Keyboard shortcuts

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