1
0
mirror of https://github.com/golang/go synced 2024-11-17 21:44:43 -07:00

crypto/x509: make TestIssue51759 builder only

Since we can't gate tests on the macOS version on normal machines,
restrict TestIssue51759 to only run on builders, where we have a way to
do this.

Change-Id: I70fc83c587689b499b6a38864973a77bb3e52596
Reviewed-on: https://go-review.googlesource.com/c/go/+/472619
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Roland Shoemaker 2023-03-01 11:50:10 -08:00
parent f1ea0249ed
commit 70efe9f721

View File

@ -1860,7 +1860,11 @@ func TestIssue51759(t *testing.T) {
if runtime.GOOS != "darwin" {
t.Skip("only affects darwin")
}
if builder := testenv.Builder(); builder == "darwin-amd64-10_14" || builder == "darwin-amd64-10_15" {
builder := testenv.Builder()
if builder == "" {
t.Skip("only run this test on the builders, as we have no reasonable way to gate tests on macOS versions elsewhere")
}
if builder == "darwin-amd64-10_14" || builder == "darwin-amd64-10_15" {
t.Skip("behavior only enforced in macOS 11 and after")
}
// badCertData contains a cert that we parse as valid