Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

The test suite covered mysql_native_password but did not exercise caching_sha2_password. This adds unit-level coverage for the SHA256-based response path used by the caching SHA2 auth plugin and an integration test that authenticates with a dedicated caching_sha2_password user.

  • Test coverage
    • Add a unit test that validates the caching SHA2 auth response computation, including salt trimming behavior.
    • Add an integration test that creates a caching_sha2_password user, authenticates with it, and cleans up afterward.
  • Visibility for testing
    • Expose the caching SHA2 response helper to the test assembly via internal access.
var response = connection.GenerateCachingSha2Response(salt);
Assert.Equal(expected, response);

[!WARNING]


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 10, 2026 02:06
Co-authored-by: kerryjiang <456060+kerryjiang@users.noreply.github.com>
Co-authored-by: kerryjiang <456060+kerryjiang@users.noreply.github.com>
Copilot AI changed the title [WIP] Add unit tests for caching_sha2_password authentication Add caching_sha2_password auth response unit coverage Feb 10, 2026
Copilot AI requested a review from kerryjiang February 10, 2026 02:09
Copy link
Member

@kerryjiang kerryjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add integration tests for caching_sha2_password? Like create another user other than root authenticating with caching_sha2_password

Co-authored-by: kerryjiang <456060+kerryjiang@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 10, 2026

Can you add integration tests for caching_sha2_password? Like create another user other than root authenticating with caching_sha2_password

Added an integration test that creates a caching_sha2_password user, authenticates with it, and cleans up afterward (commit 59edf96).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • invalid-host-that-does-not-exist
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/SuperSocket.MySQL/SuperSocket.MySQL/tests/SuperSocket.MySQL.Test/bin/Debug/net9.0/SuperSocket.MySQL.Test.runtimeconfig.json --depsfile /home/REDACTED/work/SuperSocket.MySQL/SuperSocket.MySQL/tests/SuperSocket.MySQL.Test/bin/Debug/net9.0/SuperSocket.MySQL.Test.deps.json /home/REDACTED/work/SuperSocket.MySQL/SuperSocket.MySQL/tests/SuperSocket.MySQL.Test/bin/Debug/net9.0/testhost.dll --port 45771 --endpoint 127.0.0.1:045771 --role client --parentprocessid 3908 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Add caching_sha2_password auth response unit coverage Add caching_sha2_password auth response unit and integration coverage Feb 10, 2026
Copilot AI requested a review from kerryjiang February 10, 2026 02:16
@kerryjiang kerryjiang marked this pull request as ready for review February 11, 2026 03:46
@kerryjiang kerryjiang merged commit 22d78d6 into master Feb 11, 2026
1 check passed
@kerryjiang kerryjiang deleted the copilot/add-unit-tests-caching-sha2 branch February 11, 2026 03:46
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