From 06b7f1f6250e98db4850335c73fc2da768010993 Mon Sep 17 00:00:00 2001 From: Mohammad Varmazyar Date: Fri, 10 Apr 2026 23:36:56 +0200 Subject: [PATCH] config: add consul health_filter fixture coverage Signed-off-by: Mohammad Varmazyar --- config/config_test.go | 1 + config/testdata/conf.good.yml | 1 + config/testdata/roundtrip.good.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/config/config_test.go b/config/config_test.go index 1bae23d9d4..feb443fccf 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -481,6 +481,7 @@ var expectedConf = &Config{ PathPrefix: "/consul", Token: "mysecret", Services: []string{"nginx", "cache", "mysql"}, + HealthFilter: `Service.Tags contains "canary"`, ServiceTags: []string{"canary", "v1"}, NodeMeta: map[string]string{"rack": "123"}, TagSeparator: consul.DefaultSDConfig.TagSeparator, diff --git a/config/testdata/conf.good.yml b/config/testdata/conf.good.yml index d6b1690243..15728dc37a 100644 --- a/config/testdata/conf.good.yml +++ b/config/testdata/conf.good.yml @@ -182,6 +182,7 @@ scrape_configs: token: mysecret path_prefix: /consul services: ["nginx", "cache", "mysql"] + health_filter: 'Service.Tags contains "canary"' tags: ["canary", "v1"] node_meta: rack: "123" diff --git a/config/testdata/roundtrip.good.yml b/config/testdata/roundtrip.good.yml index 24ab7d2592..d999dafd32 100644 --- a/config/testdata/roundtrip.good.yml +++ b/config/testdata/roundtrip.good.yml @@ -41,6 +41,7 @@ scrape_configs: - server: localhost:1234 token: services: [nginx, cache, mysql] + health_filter: 'Service.Tags contains "canary"' tags: [canary, v1] node_meta: rack: "123"