Skip to content

Conversation

@askdba
Copy link
Owner

@askdba askdba commented Dec 8, 2025

…ture

  • connection_test.go: Fix TestConnectionManagerMultipleConnections to properly check ExpectationsWereMet() errors instead of silently discarding them with blank identifiers

  • logging_test.go: Improve log output capture by also redirecting the standard log package output, and add proper error checking for empty output


Note

Tightens test robustness by checking sqlmock ExpectationsWereMet and capturing standard logger output in logging tests, while removing unused ping expectations.

  • Tests:
    • Connection manager (cmd/mysql-mcp-server/connection_test.go):
      • Validate sqlmock expectations via explicit ExpectationsWereMet() checks (including multi-connection test).
      • Remove unused ExpectPing() expectations and related mock variables.
    • Logging (cmd/mysql-mcp-server/logging_test.go):
      • Capture standard library logger output with log.SetOutput during tests and restore afterward.
      • Strengthen assertions to verify non-empty output and presence of key substrings for success/error logs.

Written by Cursor Bugbot for commit 126f0c3. This will update automatically on new commits. Configure here.

…ture

- connection_test.go: Fix TestConnectionManagerMultipleConnections to properly
  check ExpectationsWereMet() errors instead of silently discarding them with
  blank identifiers

- logging_test.go: Improve log output capture by also redirecting the standard
  log package output, and add proper error checking for empty output
@askdba askdba merged commit 56ca116 into main Dec 10, 2025
14 checks passed
@askdba askdba deleted the add-cmd-tests branch December 10, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants