Formatting update

This commit is contained in:
Matt Keeler 2018-03-27 16:31:27 -04:00
parent 2d8a68cce9
commit fd9297ad8f
4 changed files with 14 additions and 13 deletions

View File

@ -274,7 +274,7 @@ func (a *Agent) Start() error {
a.logger.Printf("[WARN] agent: Node name %q will not be discoverable "+ a.logger.Printf("[WARN] agent: Node name %q will not be discoverable "+
"via DNS due to invalid characters. Valid characters include "+ "via DNS due to invalid characters. Valid characters include "+
"all alpha-numerics and dashes.", a.config.NodeName) "all alpha-numerics and dashes.", a.config.NodeName)
} else if ( len(a.config.NodeName) > MaxDNSLabelLength ) { } else if len(a.config.NodeName) > MaxDNSLabelLength {
a.logger.Printf("[WARN] agent: Node name %q will not be discoverable "+ a.logger.Printf("[WARN] agent: Node name %q will not be discoverable "+
"via DNS due to it being too long. Valid lengths are between "+ "via DNS due to it being too long. Valid lengths are between "+
"1 and 63 bytes.", a.config.NodeName) "1 and 63 bytes.", a.config.NodeName)
@ -1560,7 +1560,7 @@ func (a *Agent) AddService(service *structs.NodeService, chkTypes []*structs.Che
a.logger.Printf("[WARN] agent: Service name %q will not be discoverable "+ a.logger.Printf("[WARN] agent: Service name %q will not be discoverable "+
"via DNS due to invalid characters. Valid characters include "+ "via DNS due to invalid characters. Valid characters include "+
"all alpha-numerics and dashes.", service.Service) "all alpha-numerics and dashes.", service.Service)
} else if ( len(service.Service) > MaxDNSLabelLength ) { } else if len(service.Service) > MaxDNSLabelLength {
a.logger.Printf("[WARN] agent: Service name %q will not be discoverable "+ a.logger.Printf("[WARN] agent: Service name %q will not be discoverable "+
"via DNS due to it being too long. Valid lengths are between "+ "via DNS due to it being too long. Valid lengths are between "+
"1 and 63 bytes.", service.Service) "1 and 63 bytes.", service.Service)
@ -1572,7 +1572,7 @@ func (a *Agent) AddService(service *structs.NodeService, chkTypes []*structs.Che
a.logger.Printf("[DEBUG] agent: Service tag %q will not be discoverable "+ a.logger.Printf("[DEBUG] agent: Service tag %q will not be discoverable "+
"via DNS due to invalid characters. Valid characters include "+ "via DNS due to invalid characters. Valid characters include "+
"all alpha-numerics and dashes.", tag) "all alpha-numerics and dashes.", tag)
} else if ( len(tag) > MaxDNSLabelLength ) { } else if len(tag) > MaxDNSLabelLength {
a.logger.Printf("[DEBUG] agent: Service tag %q will not be discoverable "+ a.logger.Printf("[DEBUG] agent: Service tag %q will not be discoverable "+
"via DNS due to it being too long. Valid lengths are between "+ "via DNS due to it being too long. Valid lengths are between "+
"1 and 63 bytes.", tag) "1 and 63 bytes.", tag)

View File

@ -20,6 +20,7 @@ var extraTestEndpoints = map[string][]string{
// These endpoints are ignored in unit testing for response codes // These endpoints are ignored in unit testing for response codes
var ignoredEndpoints = []string{"/v1/status/peers", "/v1/agent/monitor", "/v1/agent/reload"} var ignoredEndpoints = []string{"/v1/status/peers", "/v1/agent/monitor", "/v1/agent/reload"}
// These have custom logic // These have custom logic
var customEndpoints = []string{"/v1/query", "/v1/query/"} var customEndpoints = []string{"/v1/query", "/v1/query/"}