Commit 1e396b45 authored by Nick Cabatoff's avatar Nick Cabatoff
Browse files

When support for service tags was added, the only way we had to parse

and dedup a list of strings also forced them to be lowercase.  Now there's
another helper func that doesn't smash the case so use that instead.
parent 061c3900
Showing with 3 additions and 3 deletions
+3 -3
......@@ -287,7 +287,7 @@ func NewConsulBackend(conf map[string]string, logger log.Logger) (physical.Backe
kv: client.KV(),
permitPool: physical.NewPermitPool(maxParInt),
serviceName: service,
serviceTags: strutil.ParseDedupLowercaseAndSortStrings(tags, ","),
serviceTags: strutil.ParseDedupAndSortStrings(tags, ","),
serviceAddress: serviceAddr,
checkTimeout: checkTimeout,
disableRegistration: disableRegistration,
......
......@@ -95,7 +95,7 @@ func TestConsul_ServiceTags(t *testing.T) {
consulConfig := map[string]string{
"path": "seaTech/",
"service": "astronomy",
"service_tags": "deadbeef, cafeefac, deadc0de, feedface",
"service_tags": "deadbeef, cafeefac, deadc0de, Feedface",
"redirect_addr": "http://127.0.0.2:8200",
"check_timeout": "6s",
"address": "127.0.0.2",
......@@ -116,7 +116,7 @@ func TestConsul_ServiceTags(t *testing.T) {
t.Fatalf("failed to create physical Consul backend")
}
expected := []string{"deadbeef", "cafeefac", "deadc0de", "feedface"}
expected := []string{"deadbeef", "cafeefac", "deadc0de", "Feedface"}
actual := c.fetchServiceTags(false, false)
if !strutil.EquivalentSlices(actual, append(expected, "standby")) {
t.Fatalf("bad: expected:%s actual:%s", append(expected, "standby"), actual)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment