feat: add bounded observability and verified SLO incident alerts

This commit is contained in:
Vladislav Agapov
2026-10-29 18:01:11 +03:00
parent 470d9d6f1e
commit 6c7601802d
325 changed files with 24988 additions and 44 deletions
+24
View File
@@ -0,0 +1,24 @@
package config
import "testing"
// TestWorkerConfiguration requires a broker and gives each process an independent consumer ID.
func TestWorkerConfiguration(t *testing.T) {
t.Run("missing", func(t *testing.T) {
t.Setenv("BROKER_ADDRESS", "")
if _, err := NewWorker(); err == nil {
t.Fatal("missing broker accepted")
}
})
t.Run("configured", func(t *testing.T) {
t.Setenv("BROKER_ADDRESS", "broker:6379")
first, err := NewWorker()
if err != nil {
t.Fatal(err)
}
second, err := NewWorker()
if err != nil || first.Consumer == second.Consumer || first.BrokerAddress != "broker:6379" {
t.Fatal("invalid consumer configuration")
}
})
}