From a1eab56649a16d1dbdd946d5ffe21aee75be837e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 2 Dec 2017 21:55:43 -0800 Subject: [PATCH] Migrate all old env usages to the new naming scheme --- Makefile | 4 ++-- internal/alertmanager/benchmark_test.go | 4 ++-- internal/alertmanager/dedup_test.go | 4 ++-- views_test.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 75597c003..6ceddb3b8 100644 --- a/Makefile +++ b/Makefile @@ -63,8 +63,8 @@ clean: .PHONY: run run: $(NAME) ALERTMANAGER_URI=$(ALERTMANAGER_URI) \ - COLOR_LABELS_UNIQUE="@receiver instance cluster" \ - COLOR_LABELS_STATIC="job" \ + COLORS_LABELS_UNIQUE="@receiver instance cluster" \ + COLORS_LABELS_STATIC="job" \ DEBUG="$(GIN_DEBUG)" \ FILTER_DEFAULT="@state=active" \ PORT=$(PORT) \ diff --git a/internal/alertmanager/benchmark_test.go b/internal/alertmanager/benchmark_test.go index 1db0b6f35..8641ac501 100644 --- a/internal/alertmanager/benchmark_test.go +++ b/internal/alertmanager/benchmark_test.go @@ -27,8 +27,8 @@ func BenchmarkDedupAutocomplete(b *testing.B) { } func BenchmarkDedupColors(b *testing.B) { - os.Setenv("COLOR_LABELS_UNIQUE", "cluster instance @receiver") - os.Setenv("ALERTMANAGER_URIS", "default:http://localhost") + os.Setenv("COLORS_LABELS_UNIQUE", "cluster instance @receiver") + os.Setenv("ALERTMANAGER_URI", "http://localhost") config.Config.Read() if err := pullAlerts(); err != nil { b.Error(err) diff --git a/internal/alertmanager/dedup_test.go b/internal/alertmanager/dedup_test.go index a580a0280..9eb9d4765 100644 --- a/internal/alertmanager/dedup_test.go +++ b/internal/alertmanager/dedup_test.go @@ -87,8 +87,8 @@ func TestDedupAutocomplete(t *testing.T) { } func TestDedupColors(t *testing.T) { - os.Setenv("COLOR_LABELS_UNIQUE", "cluster instance @receiver") - os.Setenv("ALERTMANAGER_URIS", "default:http://localhost") + os.Setenv("COLORS_LABELS_UNIQUE", "cluster instance @receiver") + os.Setenv("ALERTMANAGER_URI", "http://localhost") config.Config.Read() if err := pullAlerts(); err != nil { t.Error(err) diff --git a/views_test.go b/views_test.go index 95832adb5..a3a2250d4 100644 --- a/views_test.go +++ b/views_test.go @@ -27,8 +27,8 @@ var upstreamSetup = false func mockConfig() { log.SetLevel(log.ErrorLevel) - os.Setenv("ALERTMANAGER_URIS", "default:http://localhost") - os.Setenv("COLOR_LABELS_UNIQUE", "alertname") + os.Setenv("ALERTMANAGER_URI", "http://localhost") + os.Setenv("COLORS_LABELS_UNIQUE", "alertname") config.Config.Read() if !upstreamSetup { upstreamSetup = true