Skip to content

Add TLS integration tests#80

Merged
jappeace merged 4 commits into
winterland1989:masterfrom
jappeace-sloth:tls-integration-tests
Apr 3, 2026
Merged

Add TLS integration tests#80
jappeace merged 4 commits into
winterland1989:masterfrom
jappeace-sloth:tls-integration-tests

Conversation

@jappeace-sloth

Copy link
Copy Markdown

Summary

  • Add three end-to-end tests for Database.MySQL.TLS (connectDetail, cipher verification, prepared statements over TLS)
  • Tests gated on MYSQL_TLS_CA_PATH env var — only run in NixOS VM tests
  • Both MariaDB and MySQL 8.0 VMs now configure server-side TLS with test certificates

Test plan

  • nix-build nix/ci.nix -A build — typechecks
  • nix-build nix/ci.nix -A integrated-checks — MariaDB VM with TLS tests
  • nix-build nix/ci.nix -A integrated-checks-mysql80 — MySQL 8.0 VM with TLS tests
  • GitHub Actions cabal matrix (no TLS tests run, but ensures no regressions)

🤖 Generated with Claude Code

Three new end-to-end tests exercising Database.MySQL.TLS:
- connectDetail + SELECT 1 with greeting version check
- verify encryption active via SHOW STATUS LIKE 'Ssl_cipher'
- prepared statement roundtrip over TLS

Tests are gated on MYSQL_TLS_CA_PATH env var (only run in NixOS VMs).
Both MariaDB and MySQL 8.0 VMs now configure server-side TLS with the
test certificates and pass the CA path to the integration binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jappeace-sloth pushed a commit to jappeace-sloth/mysql-haskell that referenced this pull request Apr 3, 2026
TLS tests extracted into their own PR to keep this branch focused
on the crypton-to-botan hashing replacement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jappeace-sloth and others added 3 commits April 3, 2026 09:10
- New Sha1Scramble test module with property and golden tests
- Add golden vectors to existing Sha256Scramble tests
- Golden values pin the scramble output so any hash implementation
  change (e.g. crypton to botan) can be verified against them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
base16-1.0 (transitive dep of base16-bytestring) fails to build on
GHC >= 9.8. Replace with a simple hexToBytes helper in each test module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous CI failure was a flaky Windows file permission error, not a
real build issue. Replace inline hexToBytes with base16-bytestring's
decodeLenient.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jappeace jappeace merged commit 7bcbabc into winterland1989:master Apr 3, 2026
13 checks passed
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