Skip to content
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

mustParseBool should return false for empty string #749

Merged
merged 1 commit into from
Jul 11, 2017

Conversation

krisis
Copy link
Member

@krisis krisis commented Jul 10, 2017

I.e, ENABLE_HTTPS environment variable is not set
mustParseBool(os.Getenv("ENABLE_HTTPS")) should be false

Fixes #751

harshavardhana
harshavardhana previously approved these changes Jul 10, 2017
harshavardhana
harshavardhana previously approved these changes Jul 10, 2017
Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM works as described.

@krisis
Copy link
Member Author

krisis commented Jul 11, 2017

@deekoder don't merge this yet, there is a small change that I wish to do this PR.

I.e, ENABLE_HTTPS environment variable is not set
`mustParseBool(os.Getenv("ENABLE_HTTPS"))` should be `false`
Copy link
Member Author

@krisis krisis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments to separate actual fix and extraneous changes.

@@ -124,7 +124,7 @@ func testMakeBucketError() {
mustParseBool(os.Getenv(enableHTTPS)),
)
if err != nil {
log.Fatalf("Error:", err)
log.Fatalf("Error: %s", err)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was spotted by my editor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops yes..

@@ -3917,7 +3917,7 @@ func testFunctionalV2() {
}
}

// Convert string to bool and always return true if any error
// Convert string to bool and always return false if any error
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit fixed, not originally part of this PR

@krisis
Copy link
Member Author

krisis commented Jul 11, 2017

@deekoder This PR can now be merged subject to reviewers' approval.

@deekoder deekoder merged commit 5d6d470 into minio:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants