Skip to content

Commit 1476255

Browse files
akoclaude
andcommitted
fix: inject BackendFactory in integration test executor setup
PR #238 made BackendFactory required before Connect(), but setupTestEnv in roundtrip_helpers_test.go still created a bare Executor without calling SetBackendFactory(), causing all integration tests to fail with "no backend factory configured". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f87c86d commit 1476255

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

mdl/executor/roundtrip_helpers_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
"testing"
2323

2424
"github.com/mendixlabs/mxcli/mdl/ast"
25+
"github.com/mendixlabs/mxcli/mdl/backend"
26+
mprbackend "github.com/mendixlabs/mxcli/mdl/backend/mpr"
2527
"github.com/mendixlabs/mxcli/mdl/visitor"
2628
"github.com/pmezard/go-difflib/difflib"
2729
)
@@ -220,6 +222,7 @@ func setupTestEnv(t *testing.T) *testEnv {
220222

221223
output := &bytes.Buffer{}
222224
exec := New(output)
225+
exec.SetBackendFactory(func() backend.FullBackend { return mprbackend.New() })
223226

224227
// Connect to project
225228
connectStmt := &ast.ConnectStmt{

0 commit comments

Comments
 (0)