From ca88f68ab6c2aa03d507cdcb593ab09bde06192e Mon Sep 17 00:00:00 2001 From: Wojciech Kocjan Date: Tue, 13 Oct 2020 13:32:52 +0200 Subject: [PATCH] chore: replace port 9999 with 8086 in tests --- sidecar_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sidecar_test.go b/sidecar_test.go index 0591354..8b75fab 100644 --- a/sidecar_test.go +++ b/sidecar_test.go @@ -147,13 +147,13 @@ func Test_assembleConf(t *testing.T) { pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - TelegrafMetricsPorts: "6060,9999", + TelegrafMetricsPorts: "6060,8086", }, }, }, wantConfig: ` [[inputs.prometheus]] - urls = ["http://127.0.0.1:6060/metrics", "http://127.0.0.1:9999/metrics"] + urls = ["http://127.0.0.1:6060/metrics", "http://127.0.0.1:8086/metrics"] `, @@ -186,14 +186,14 @@ func Test_assembleConf(t *testing.T) { TelegrafMetricsPath: "/metrics/usage", TelegrafMetricsScheme: "https", TelegrafInterval: "10s", - TelegrafMetricsPorts: "6060,9999", + TelegrafMetricsPorts: "6060,8086", TelegrafEnableInternal: "true", }, }, }, wantConfig: ` [[inputs.prometheus]] - urls = ["https://127.0.0.1:6060/metrics/usage", "https://127.0.0.1:9999/metrics/usage"] + urls = ["https://127.0.0.1:6060/metrics/usage", "https://127.0.0.1:8086/metrics/usage"] interval = "10s" [[inputs.internal]] @@ -864,11 +864,11 @@ func Test_ports(t *testing.T) { pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - TelegrafMetricsPorts: "9999,6060,6060", + TelegrafMetricsPorts: "8086,6060,6060", }, }, }, - want: []string{"6060", "9999"}, + want: []string{"6060", "8086"}, }, { name: "single port from TelegrafMetricsPorts",