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

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(),
}
switch check.Type {
case structs.ServiceCheckHTTP:
if check.Protocol == "" {
check.Protocol = "http"
}
switch check.Type {
case structs.ServiceCheckHTTP:
url := url.URL{
Scheme: check.Protocol,
Host: fmt.Sprintf("%s:%d", ip, port),