Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Correct the server and client certificates used in dialer_test.go #933

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

hessjcg
Copy link
Contributor

@hessjcg hessjcg commented Jan 31, 2025

Update the dialer_test and other tests to use more accurate certificate validation logic. This improves the tests in these ways:

  1. The tests now do full mTLS verification.
  2. The certificates used in the tests accurately reproduce the structure of the real certificates used by Cloud SQL
  3. The complex certificate logic is now consolidated into internal/mock/certs.go

Part of #932

@hessjcg hessjcg force-pushed the gh-932-test-certs branch 4 times, most recently from 3a7c320 to d237673 Compare January 31, 2025 22:39
@hessjcg hessjcg marked this pull request as ready for review January 31, 2025 22:40
@hessjcg hessjcg requested a review from a team as a code owner January 31, 2025 22:40
Copy link
Collaborator

@jackwotherspoon jackwotherspoon left a comment

Choose a reason for hiding this comment

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

couple nits, otherwise LGTM ✅

internal/mock/certs.go Outdated Show resolved Hide resolved
internal/mock/certs.go Outdated Show resolved Hide resolved
internal/mock/certs.go Outdated Show resolved Hide resolved
@hessjcg hessjcg merged commit ae376f1 into main Feb 5, 2025
14 checks passed
@hessjcg hessjcg deleted the gh-932-test-certs branch February 5, 2025 21:00
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