dbtest gains UpSQL, ApplyVersion, SimpleProtocol, Tx, On and Q (Exec, Scan,
ID, Int, String, Strings, Attempt, Refuse), WantPgError, Name and the
SQLState constants. internal/db's mustExec, mustScan, mustStrings,
deliveryTx, attempt, mustRefuse, assertPgError, the sqlstate constants and
deliveryName become their dbtest counterparts at every caller; the fx
builders' id scans become Q.ID. The fx builders and the helpers built on
them lose their unused ctx parameter. The two tests that open one
transaction in the parent (TestProviderConnectionConstraints,
TestDeliverySchemaFacts) rebind it in each subtest that runs a statement
with dbtest.On(t, q.Tx()).
TestTaxonomyMigrationBuckets runs on a scratch database through two
connections (simple protocol to apply, extended to assert) instead of a
docker container; its checks are tables of (query, want) in three named
phases, and its gocognit pin is deleted.
TestIntegrationDeliveryMigrationUpDownUp uses Scratch, UpTo and
ApplyVersion; TestInvoiceIssuedPaymentPaidBackfill replays 00022 through
UpSQL on a simple-protocol transaction; the reader tests in internal/migrate
use Tx; TestFullMigrationSequence and the delivery benchmark migrate a
scratch database with migrate.Sources().
The delivery benchmark's skip text is unified with the openers'. No test is
added or renamed. 13 breaks, each failed the old and the new test: the 11 on
the migration subjects, one on a WantPgError caller and one on a Q.Refuse
caller.