(chore): Change to use a shared connection string for simplicity testing PQE-411#55
Conversation
WalkthroughRemoves CLI flags for driver selection and replaces them with environment variable-based configuration. A new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
integration/cypher_test.go (1)
95-98: Consider removing duplicate driver derivation from the test.
SetupDBalready resolves/validates the driver path; re-readingCONNECTION_STRINGhere duplicates setup logic. ReturningdriverfromSetupDBwould keep this in one place.♻️ Possible refactor direction
- db, ctx := SetupDB(t, datasetNames...) - driver, err := driverFromConnStr(os.Getenv("CONNECTION_STRING")) - if err != nil { - t.Fatalf("Failed to detect driver: %v", err) - } + db, ctx, driver := SetupDB(t, datasetNames...)(Then adjust
SetupDBsignature inintegration/harness.goto returndriver.)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integration/cypher_test.go` around lines 95 - 98, The test duplicates driver detection by calling driverFromConnStr(os.Getenv("CONNECTION_STRING")) even though SetupDB already resolves the driver; change SetupDB (in integration/harness.go) to return the detected driver (e.g., add a return value like driver string) and update its signature, then remove the duplicate driverFromConnStr call from integration/cypher_test.go and use the driver returned from SetupDB; also update any other callers of SetupDB to accept and propagate the new return value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@integration/cypher_test.go`:
- Around line 95-98: The test duplicates driver detection by calling
driverFromConnStr(os.Getenv("CONNECTION_STRING")) even though SetupDB already
resolves the driver; change SetupDB (in integration/harness.go) to return the
detected driver (e.g., add a return value like driver string) and update its
signature, then remove the duplicate driverFromConnStr call from
integration/cypher_test.go and use the driver returned from SetupDB; also update
any other callers of SetupDB to accept and propagate the new return value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ea6f0c0f-55c3-4f97-8401-6f698d6c4fbe
📒 Files selected for processing (2)
integration/cypher_test.gointegration/harness.go
Description
Resolves: PQE-411
Type of Change
Testing
go test -tags manual_integration ./integration/...)Screenshots (if appropriate):
Driver Impact
drivers/pg)drivers/neo4j)Checklist
go.mod/go.sumare up to date if dependencies changedSummary by CodeRabbit
Release Notes
CONNECTION_STRINGenvironment variable, eliminating the need for manual flag specification during test execution.