Migrate all old env usages to the new naming scheme

This commit is contained in:
Łukasz Mierzwa
2017-12-02 21:55:43 -08:00
parent 860375650e
commit a1eab56649
4 changed files with 8 additions and 8 deletions

View File

@@ -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) \

View File

@@ -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)

View File

@@ -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)

View File

@@ -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