package main_test import ( "context" main "show-rss" "show-rss/src/db" "testing" "time" ) func TestMain(t *testing.T) { ctx, can := context.WithTimeout(context.Background(), 2*time.Second) defer can() if err := main.Main(db.Test(t, ctx)); err != nil && ctx.Err() == nil { t.Fatal(err) } }