test

package
v0.0.0-...-0637115 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidUUID = "123e4567-z89b-12d3-a456-426655440000"
View Source
const ValidUUID = "123e4567-e89b-12d3-a456-426655440000"

Variables

This section is empty.

Functions

func BuildAuthContext

func BuildAuthContext(userID string, email string, permissionsList []string) context.Context

Generates a fake JWT token for testing purposes Use for testing graphql resolvers Allows more flexibility in creating a prepopulated context

func ResolverAuthContext

func ResolverAuthContext() context.Context

Generates a fake JWT token for testing purposes Use for testing graphql resolvers

func SetupPluginTest

func SetupPluginTest(viperConfig []byte) (*transistor.Transistor, error)

Setup logic common to all Plugin tests Load viper config, parse plugins, and setup log level/format and instantiate transistor Configs in this case are loaded inline from the plugin test itself

func SetupResolverTest

func SetupResolverTest(migrators []interface{}) (*gorm.DB, error)

Setup logic common to all Resolver tests Load viper config, parse plugins, and setup log level/format Configs in this case are loaded from a test yml file

func SetupResolverTestWithPath

func SetupResolverTestWithPath(configFilePath string, migrators []interface{}) (*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