(t *testing.T)
| 6347 | } |
| 6348 | |
| 6349 | func 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 | |
| 6372 | func TestContains(t *testing.T) { |
| 6373 | t.Run("Item exists", func(t *testing.T) { |
nothing calls this directly
no test coverage detected