Documentation ¶
Index ¶
- Constants
- func BuildAuthContext(userID string, email string, permissionsList []string) context.Context
- func ResolverAuthContext() context.Context
- func SetupPluginTest(viperConfig []byte) (*transistor.Transistor, error)
- func SetupResolverTest(migrators []interface{}) (*gorm.DB, error)
- func SetupResolverTestWithPath(configFilePath string, migrators []interface{}) (*gorm.DB, error)
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 ¶
Generates a fake JWT token for testing purposes Use for testing graphql resolvers Allows more flexibility in creating a prepopulated context
func ResolverAuthContext ¶
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 ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.