]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/x509: make TestIssue51759 builder only
authorRoland Shoemaker <roland@golang.org>
Wed, 1 Mar 2023 19:50:10 +0000 (11:50 -0800)
committerRoland Shoemaker <roland@golang.org>
Wed, 1 Mar 2023 20:16:39 +0000 (20:16 +0000)
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>
src/crypto/x509/verify_test.go

index 22312ef9101bc87d53f3befd384ab3987405a288..164c47fd6d5512d236a0bb7b67bee8f997dd6d0b 100644 (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