chore: establish local platform baseline

This commit is contained in:
Codex Local
2026-08-26 06:41:54 +08:00
commit 29bdf4900f
575 changed files with 95644 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package identity
import (
"context"
"testing"
)
func TestPrincipalContext(t *testing.T) {
if _, ok := PrincipalFromContext(context.Background()); ok {
t.Fatal("empty context should not contain a principal")
}
expected := Principal{Issuer: "issuer", Subject: "subject"}
actual, ok := PrincipalFromContext(WithPrincipal(context.Background(), expected))
if !ok || actual != expected {
t.Fatalf("principal = %#v, %t, want %#v", actual, ok, expected)
}
}