MCPcopy Index your code
hub / github.com/PasarGuard/node / NewTestConfig

Function NewTestConfig

config/config.go:76–81  ·  view source on GitHub ↗

NewTestConfig creates a config for testing

(generatedConfigPath string, key uuid.UUID)

Source from the content-addressed store, hash-verified

74
75// NewTestConfig creates a config for testing
76func NewTestConfig(generatedConfigPath string, key uuid.UUID) *Config {
77 cfg, _ := Load()
78 cfg.GeneratedConfigPath = generatedConfigPath
79 cfg.ApiKey = key
80 return cfg
81}
82
83func GetEnv(key, fallback string) string {
84 value, exists := os.LookupEnv(key)

Callers 2

TestMainFunction · 0.92
TestMainFunction · 0.92

Calls 1

LoadFunction · 0.85

Tested by 2

TestMainFunction · 0.74
TestMainFunction · 0.74