notify: Webhook endpoints can fail, but we must start the server. (#4060)

Ignore any network errors when registering a webhook
notifier during Minio startup sequence. This way server
can be started even if the webhook endpoint is not available
and unreachable.
This commit is contained in:
Harshavardhana
2017-04-08 01:13:55 -07:00
committed by GitHub
parent 6507c30bbc
commit 6b4f368dfe
4 changed files with 110 additions and 34 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func TestNewWebHookNotify(t *testing.T) {
t.Fatal("Unexpected should fail")
}
serverConfig.Notify.SetWebhookByID("10", webhookNotify{Enable: true, Endpoint: "http://www."})
serverConfig.Notify.SetWebhookByID("10", webhookNotify{Enable: true, Endpoint: "http://127.0.0.1:xxx"})
_, err = newWebhookNotify("10")
if err == nil {
t.Fatal("Unexpected should fail with lookupHost")