feat(dolt): add federation prototype tests
Add integration tests validating Dolt APIs needed for peer-to-peer federation between Gas Towns: - TestFederationDatabaseIsolation: verify separate towns have isolated DBs - TestFederationVersionControlAPIs: branch, checkout, merge, commit - TestFederationRemoteConfiguration: AddRemote accepts dolthub:// URLs - TestFederationHistoryQueries: commit history, dolt_log, AS OF Key finding: Production federation uses dolt sql-server remotesapi (port 8080) for direct peer-to-peer push/pull - no DoltHub required. Also fixes concurrent_test.go Merge() return value handling. Refs: bd-wkumz (Federation epic), hq-ew1mbr.7 (prototype task) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
d3ccd5cfba
commit
4f3c3febd5
@@ -459,13 +459,13 @@ func TestBranchPerAgentMergeRace(t *testing.T) {
|
||||
}
|
||||
|
||||
// First merge should succeed
|
||||
_, err1 := store.Merge(ctx, "agent-1")
|
||||
conflicts1, err1 := store.Merge(ctx, "agent-1")
|
||||
|
||||
// Second merge may conflict (both modified same row)
|
||||
_, err2 := store.Merge(ctx, "agent-2")
|
||||
conflicts2, err2 := store.Merge(ctx, "agent-2")
|
||||
|
||||
t.Logf("Merge agent-1 result: %v", err1)
|
||||
t.Logf("Merge agent-2 result: %v", err2)
|
||||
t.Logf("Merge agent-1 result: err=%v conflicts=%d", err1, len(conflicts1))
|
||||
t.Logf("Merge agent-2 result: err=%v conflicts=%d", err2, len(conflicts2))
|
||||
|
||||
// At least one should succeed
|
||||
if err1 != nil && err2 != nil {
|
||||
|
||||
Reference in New Issue
Block a user