feat(accounts): add provider account inventory api

This commit is contained in:
phamnazage-jpg
2026-05-29 14:43:34 +08:00
parent 83148ce3c1
commit b5343452cb
12 changed files with 1332 additions and 0 deletions

View File

@@ -144,6 +144,7 @@ func TestStoreAppliesLatestMigration(t *testing.T) {
"route_decision_logs",
"route_failover_events",
"route_sticky_audit",
"provider_accounts",
} {
if !tableExists(t, store.SQLDB(), table) {
t.Fatalf("table %q does not exist after latest migration", table)
@@ -272,6 +273,23 @@ func TestStoreAppliesLatestMigration(t *testing.T) {
t.Fatalf("column %q missing from route_sticky_audit", column)
}
}
for _, column := range []string{
"host_id",
"provider_id",
"route_id",
"shadow_group_id",
"host_account_id",
"key_fingerprint",
"account_status",
"last_probe_status",
"last_probe_at",
"disabled_reason",
} {
if !tableColumnExists(t, store.SQLDB(), "provider_accounts", column) {
t.Fatalf("column %q missing from provider_accounts", column)
}
}
}
func TestStoreInitEnforcesLogicalRoutingConstraints(t *testing.T) {