-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
Background
As noted by @shueybubbles in PR #640:
feels like we need some tests that build the app in /cmd/modern and run it. This case is a good one to start with.
Proposal
Add e2e tests that actually build the sqlcmd binary and exercise real-world scenarios. The piped input fix from #640 would be a good first test case.
Suggested test cases
- Piped input - Verify that piping SQL to sqlcmd works without panicking (regression test for sqlcmd panic when run inside emacs #607)
- Basic query execution - Verify -Q\ flag works correctly
- Input file execution - Verify -i\ flag works correctly
- Help output - Verify --help\ returns expected output
Implementation notes
- Tests would live in \cmd/modern/e2e_test.go\ or similar
- Use \go build\ to compile the binary, then \�xec.Command\ to run it
- May need build tags to skip in CI if no SQL Server is available for connection tests
- Non-connection tests (like help, version, piped input that fails gracefully) can run anywhere
Related
- fix: prevent nil pointer panic when piping input to sqlcmd (fixes #607) #640 - fix: prevent nil pointer panic when piping input to sqlcmd (fixes sqlcmd panic when run inside emacs #607)
- sqlcmd panic when run inside emacs #607 - sqlcmd panic when run inside emacs
Metadata
Metadata
Assignees
Labels
No labels