beads/internal/testutil/testdata/dolt-init.sql
beads/crew/emma 1c285fd576 testutil: migrate test Dolt server from binary-spawning to testcontainers
Replace 1,046 lines of hand-rolled test server infrastructure (binary
spawning, flock coordination, PID files, zombie reaping) with Docker
testcontainers-go. Pinned to Dolt 1.43.0 due to upstream auth bug
(root@localhost vs root@%) on >= 1.44.

Preserves existing API surface (StartTestDoltServer, IsCrashed,
CrashError) so zero consumer changes needed. Adds new container-native
API (StartIsolatedDoltContainer, EnsureDoltContainerForTestMain,
RequireDoltContainer) matching gastown pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-28 21:12:41 -08:00

7 lines
477 B
SQL

-- Workaround for Dolt Docker image auth bug: the default root user is
-- created as root@localhost, but the go-sql-driver connects as root@%
-- (via mapped TCP port), which fails authentication on Dolt >= 1.44.
-- Not currently used — the Dolt image doesn't process /docker-entrypoint-initdb.d/.
-- Kept for when DoltHub adds init script support to their Docker image.
CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY '';
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;