mirror of
https://github.com/prymitive/karma
synced 2026-05-13 03:56:59 +00:00
Migrate all old env usages to the new naming scheme
This commit is contained in:
4
Makefile
4
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) \
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user