Added a test to check check creation

This commit is contained in:
Diptanu Choudhury 2015-11-18 14:20:45 -08:00
parent 5608531143
commit c9ca03afa5
1 changed files with 3 additions and 3 deletions

View File

@ -179,11 +179,11 @@ func (c *ConsulClient) makeChecks(service *structs.Service, ip string, port int)
Interval: check.Interval.String(),
Timeout: check.Timeout.String(),
}
if check.Protocol == "" {
check.Protocol = "http"
}
switch check.Type {
case structs.ServiceCheckHTTP:
if check.Protocol == "" {
check.Protocol = "http"
}
url := url.URL{
Scheme: check.Protocol,
Host: fmt.Sprintf("%s:%d", ip, port),