the-custodian/docs/changes/CUST-WP-0080/keycape_bootstrap_native_test.go
codex bb3e2db07e
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Reject generated-only commits / generated-commit-guard (push) Successful in 8s
security: record KeyCape custody caller reconciliation and native config proof
2026-10-13 19:49:24 +02:00

23 lines
741 B
Go

package config
import "testing"
func TestCustodyBootstrapNativeLoader(t *testing.T) {
cfg, err := Load("../../bootstrap-fixture.json")
if err != nil {
t.Fatal("bootstrap output failed native config parsing")
}
if cfg.PrivacyIDEA.AdminToken != "" || cfg.PrivacyIDEA.AdminTokenFile != "/etc/keycape-factor/admin-token" {
t.Fatal("credential source mismatch")
}
if cfg.PrivacyIDEA.Realm != "coulomb" || !cfg.PrivacyIDEA.RequireForAll {
t.Fatal("factor policy mismatch")
}
clients, err := cfg.Registrations()
if err != nil || len(clients) != 5 {
t.Fatal("bootstrap registrations did not survive parsing")
}
if cfg.LLDAP.BindPW == "" || cfg.Authelia.ClientSecret == "" {
t.Fatal("bootstrap credential fields missing")
}
}