-
Notifications
You must be signed in to change notification settings - Fork 656
Better error messages for empty string ENV variables #940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error messages for empty string ENV variables #940
Conversation
src/tests/all.rs
Outdated
@@ -138,11 +138,17 @@ fn app() -> (record::Bomb, Arc<App>, conduit_middleware::MiddlewareBuilder) { | |||
return (bomb, app, middleware); | |||
} | |||
|
|||
/// Returnx the environment variable only if it has been defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are doc comments visible in integration tests? I don't think they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK tests don't show up in documentation at all. While you're changing this to be a regular comment, could you remove the stray "x" at the end of "Returnx" too please? :)
src/tests/all.rs
Outdated
@@ -138,11 +138,17 @@ fn app() -> (record::Bomb, Arc<App>, conduit_middleware::MiddlewareBuilder) { | |||
return (bomb, app, middleware); | |||
} | |||
|
|||
/// Returnx the environment variable only if it has been defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK tests don't show up in documentation at all. While you're changing this to be a regular comment, could you remove the stray "x" at the end of "Returnx" too please? :)
bors: r+ |
940: Better error messages for empty string ENV variables r=carols10cents Fixes up #937, which was caused by me not having the `TEST_DATABASE_URL` set i.e. it was `TEST_DATABASE_URL=`. Thanks to Arnavion on the #rust channel for pointing out I could use unwrap_or() to cover both the `None` and `""` cases at once :).
Build succeeded |
Fixes up #937, which was caused by me not having the
TEST_DATABASE_URL
set i.e. it wasTEST_DATABASE_URL=
. Thanks to Arnavion on the #rust channel for pointing out I could use unwrap_or() to cover both theNone
and""
cases at once :).