fix: update StopDockerChrome calls to match new API signature#9
Conversation
The e2etest.StopDockerChrome function signature changed from (t, chromeCmd, debugPort) to (t, debugPort). Updated all test files to use the new signature. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Closing: The actual issue is in the lvt module. The local go.work uses a newer unpublished API, but CI uses the published version with the old signature. The lvt module needs to be updated and published first. |
There was a problem hiding this comment.
Pull request overview
This PR updates the e2etest.StopDockerChrome function calls in three test files to match the new API signature that no longer requires the chromeCmd parameter. The API was changed from (t, chromeCmd, debugPort) to (t, debugPort).
- Updated function calls to use the new two-parameter signature
(t, debugPort) - Retained assignment of
chromeCmdreturn value but discarded it with blank identifier pattern - Added explanatory comments about the discarded return value
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
todos/todos_test.go |
Updated StopDockerChrome call to use new signature and added blank identifier assignment for unused chromeCmd |
counter/counter_test.go |
Updated StopDockerChrome call to use new signature and added blank identifier assignment for unused chromeCmd |
avatar-upload/avatar-upload_test.go |
Updated StopDockerChrome call to use new signature and added blank identifier assignment for unused chromeCmd |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| chromeCmd := e2etest.StartDockerChrome(t, debugPort) | ||
| defer e2etest.StopDockerChrome(t, chromeCmd, debugPort) | ||
| defer e2etest.StopDockerChrome(t, debugPort) | ||
| _ = chromeCmd // Command returned for reference; cleanup handled by StopDockerChrome |
There was a problem hiding this comment.
The blank identifier assignment pattern is unnecessarily verbose. The variable chromeCmd is assigned on line 107, then used in line 109 just to discard it with _ = chromeCmd.
For consistency with login/login_test.go (which already uses the updated API), consider using the blank identifier directly in the assignment:
_ = e2etest.StartDockerChrome(t, debugPort)
defer e2etest.StopDockerChrome(t, debugPort)This eliminates the need for the explanatory comment and is more idiomatic Go.
| chromeCmd := e2etest.StartDockerChrome(t, debugPort) | ||
| defer e2etest.StopDockerChrome(t, chromeCmd, debugPort) | ||
| defer e2etest.StopDockerChrome(t, debugPort) | ||
| _ = chromeCmd // Command returned for reference; cleanup handled by StopDockerChrome |
There was a problem hiding this comment.
The blank identifier assignment pattern is unnecessarily verbose. The variable chromeCmd is assigned on line 55, then used in line 57 just to discard it with _ = chromeCmd.
For consistency with login/login_test.go (which already uses the updated API), consider using the blank identifier directly in the assignment:
_ = e2etest.StartDockerChrome(t, debugPort)
defer e2etest.StopDockerChrome(t, debugPort)This eliminates the need for the explanatory comment and is more idiomatic Go.
| chromeCmd := e2etest.StartDockerChrome(t, debugPort) | ||
| defer e2etest.StopDockerChrome(t, chromeCmd, debugPort) | ||
| defer e2etest.StopDockerChrome(t, debugPort) | ||
| _ = chromeCmd // Command returned for reference; cleanup handled by StopDockerChrome |
There was a problem hiding this comment.
The blank identifier assignment pattern is unnecessarily verbose. The variable chromeCmd is assigned on line 50, then used in line 52 just to discard it with _ = chromeCmd.
For consistency with login/login_test.go (which already uses the updated API), consider using the blank identifier directly in the assignment:
_ = e2etest.StartDockerChrome(t, debugPort)
defer e2etest.StopDockerChrome(t, debugPort)This eliminates the need for the explanatory comment and is more idiomatic Go.
Updates github.com/livetemplate/lvt to v0.0.0-20251130141940-9b94cde94e9d which includes the new StopDockerChrome API signature. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
e2etest.StopDockerChromecalls in 3 test files to match the new function signature(t, chromeCmd, debugPort)to(t, debugPort)counter/counter_test.go,avatar-upload/avatar-upload_test.go,todos/todos_test.goTest plan
./test-all.sh- all tests pass🤖 Generated with Claude Code