test

package
v4.2501.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestConfigurationFile = "configuration.json"

TestConfigurationFile with configuration

View Source
var TestEnvPrefix = "TEST"

TestEnvPrefix for environment variables

Functions

func GetTestDataFolder

func GetTestDataFolder() string

func NewAuthContextForTests

func NewAuthContextForTests() (context.Context, error)

NewAuthContextForTests context for testing

func NewClientForTests

func NewClientForTests() (*barcode.APIClient, error)

NewClientForTests creates new Client with TestConfig

Types

type Config

type Config struct {
	JwtConfig jwt.Config        `json:"jwt"`
	APIConfig api.Configuration `json:"api"`
}

Config is Configuration

func NewTestConfig

func NewTestConfig(fileName string, envPrefix string) (*Config, error)

NewTestConfig creates new Config from JSON-file if exists or from ENV

Jump to

Keyboard shortcuts

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