(t *testing.T)
| 492 | } |
| 493 | |
| 494 | func 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 | |
| 516 | func TestCollectionConfigsInitialized(t *testing.T) { |
| 517 | expectedCollections := []string{ |
nothing calls this directly
no outgoing calls
no test coverage detected