Fail loudly on an unparseable SENTRY_DSN and a malformed .env (closes #283)
All checks were successful
check / check (push) Successful in 2m54s
All checks were successful
check / check (push) Successful in 2m54s
This commit was merged in pull request #289.
This commit is contained in:
@@ -51,6 +51,18 @@ func EnvPortForTest(key string, defaultValue int) (int, error) {
|
||||
return envPort(key, defaultValue)
|
||||
}
|
||||
|
||||
// EnvSentryDSNForTest exposes envSentryDSN.
|
||||
func EnvSentryDSNForTest(key string) (string, error) {
|
||||
return envSentryDSN(key)
|
||||
}
|
||||
|
||||
// LoadDotEnvFileForTest exposes the loader LoadDotEnv runs, over a
|
||||
// caller-named file rather than the process working directory, so
|
||||
// each .env state can be covered without moving the test process.
|
||||
func LoadDotEnvFileForTest(path string) error {
|
||||
return loadDotEnvFile(path)
|
||||
}
|
||||
|
||||
// EnvBindAddressForTest exposes envBindAddress.
|
||||
func EnvBindAddressForTest(key, defaultValue string) (string, error) {
|
||||
return envBindAddress(key, defaultValue)
|
||||
|
||||
Reference in New Issue
Block a user