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
@@ -0,0 +1,39 @@
package production
import (
"testing"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/internal/cursor"
)
// TestService_New rejects each missing dependency separately.
func TestService_New(t *testing.T) {
t.Run("Negative: missing store", func(t *testing.T) {
// Arrange.
codec, err := cursor.New()
if err != nil {
t.Fatal(err)
}
// Act.
svc, err := New(nil, codec)
// Assert.
if err == nil || svc != nil {
t.Fatalf("service=%v, error=%v", svc, err)
}
})
t.Run("Negative: missing codec", func(t *testing.T) {
// Arrange.
repo := newStoreStub(t)
// Act.
svc, err := New(repo, nil)
// Assert.
if err == nil || svc != nil {
t.Fatalf("service=%v, error=%v", svc, err)
}
})
}