MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestAllSchemas

Function TestAllSchemas

internal/search/search_test.go:494–514  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

492}
493
494func TestAllSchemas(t *testing.T) {
495 schemas := []struct {
496 name string
497 getter func() *api.CollectionSchema
498 }{
499 {"ledgers", getLedgerSchema},
500 {"balances", getBalanceSchema},
501 {"transactions", getTransactionSchema},
502 {"reconciliations", getReconciliationSchema},
503 {"identities", getIdentitySchema},
504 }
505
506 for _, schema := range schemas {
507 t.Run(schema.name, func(t *testing.T) {
508 s := schema.getter()
509 assert.NotNil(t, s)
510 assert.Equal(t, schema.name, s.Name)
511 assert.NotEmpty(t, s.Fields)
512 })
513 }
514}
515
516func TestCollectionConfigsInitialized(t *testing.T) {
517 expectedCollections := []string{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected