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

Function TestLogRollbackResult_LedgerForge

transaction_test.go:6349–6370  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6347}
6348
6349func TestLogRollbackResult_LedgerForge(t *testing.T) {
6350 cnf := &config.Configuration{
6351 Redis: config.RedisConfig{Dns: "localhost:6379"},
6352 Queue: config.QueueConfig{
6353 WebhookQueue: "webhook_queue",
6354 TransactionQueue: "transaction_queue",
6355 NumberOfQueues: 1,
6356 },
6357 }
6358 config.ConfigStore.Store(cnf)
6359
6360 mockDS := new(mocks.MockDataSource)
6361 ledgerforge := &LedgerForge{datasource: mockDS, config: cnf}
6362
6363 t.Run("Log Success", func(t *testing.T) {
6364 ledgerforge.logRollbackResult("batch_123", "voided", nil)
6365 })
6366
6367 t.Run("Log Failure", func(t *testing.T) {
6368 ledgerforge.logRollbackResult("batch_456", "voided", fmt.Errorf("rollback failed"))
6369 })
6370}
6371
6372func TestContains(t *testing.T) {
6373 t.Run("Item exists", func(t *testing.T) {

Callers

nothing calls this directly

Calls 1

logRollbackResultMethod · 0.95

Tested by

no test coverage detected