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

Fix TLS_BadVerify test assertions on macOS #15903

Merged
merged 2 commits into from
Jan 5, 2023
Merged

Conversation

pglass
Copy link

@pglass pglass commented Jan 4, 2023

Description

On macOS, we get a different error message for an untrusted TLS certificate which causes a couple of check tests cases to fail. This fixes the assertion so that these tests pass on macOS.

Testing & Reproduction steps

go test ./agent/checks -run TLS_BadVerify

PR Checklist

  • updated test coverage
  • external facing docs updated
  • not a security concern

@pglass pglass added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test pr/no-docs PR does not include docs and should not trigger reminder for cherrypicking them. labels Jan 4, 2023
@pglass pglass requested review from kisunji and cthain January 4, 2023 22:24
Copy link
Contributor

@cthain cthain left a comment

Choose a reason for hiding this comment

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

LGTM!

r.Fatalf("should fail with certificate error %v", notif.OutputMap())
}
})
}

// isInvalidCertificateError checks the error string for an untrusted certificate error.
// The specific error message is different on Linux and macOS.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a "this is safe to remove when golang/go#52010 is addressed"

Copy link
Author

Choose a reason for hiding this comment

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

👍 f7c028a

@kisunji
Copy link
Contributor

kisunji commented Jan 4, 2023

Cause: golang/go#52010

@pglass pglass merged commit 666c2b2 into main Jan 5, 2023
@pglass pglass deleted the pglass/macos-check-fixes branch January 5, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry pr/no-docs PR does not include docs and should not trigger reminder for cherrypicking them. pr/no-metrics-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants