mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-26 01:41:04 +08:00
Tests for all pure functions (extractTitle, hostOf, uniq, id0, itoa), engine lifecycle (enqueue edge cases, cooldown, close), DNS resolution with both real and dead-DB asset stores, HTTP probing via httptest, and worker integration. Uses a dead-DB pattern (unreachable PG) to exercise code paths that discard DB errors without requiring a live database.
14 lines
162 B
Go
14 lines
162 B
Go
package enrich
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/Autumn-27/artex/db"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
db.SuffixTestDatabase("enrich")
|
|
os.Exit(m.Run())
|
|
}
|