]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: skip part of the test based on GOOS instead of GOARCH
authorNevkontakte <aleks@nevkontakte.com>
Mon, 21 Apr 2025 13:13:04 +0000 (13:13 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 23 Apr 2025 17:22:11 +0000 (10:22 -0700)
This allows to skip the last part of the test under GopherJS as well as
WebAssembly, since GopherJS shares GOOS=js with wasm.

Change-Id: I41adad788043c1863b23eb2a6da9bc9aa2833092
GitHub-Last-Rev: d8d42a3b7ccb2bee6479306b6ac1a319443702ec
GitHub-Pull-Request: golang/go#51827
Reviewed-on: https://go-review.googlesource.com/c/go/+/394114
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/crypto/tls/handshake_client_test.go
src/crypto/tls/handshake_server_test.go

index 5e636e9109e45e1d1683c4e88660cf27ef14cf91..6118711a0eb65ae6276681c7e8b204aeaaaadcc0 100644 (file)
@@ -2655,8 +2655,8 @@ func TestClientHandshakeContextCancellation(t *testing.T) {
        if err != context.Canceled {
                t.Errorf("Unexpected client handshake error: %v", err)
        }
-       if runtime.GOARCH == "wasm" {
-               t.Skip("conn.Close does not error as expected when called multiple times on WASM")
+       if runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
+               t.Skip("conn.Close does not error as expected when called multiple times on GOOS=js or GOOS=wasip1")
        }
        err = cli.Close()
        if err == nil {
index 9a2a378dcedaaa0cfc9848260c469e85113d4716..c72974ef951791c180a8e13e46121900936c2c76 100644 (file)
@@ -2044,8 +2044,8 @@ func TestServerHandshakeContextCancellation(t *testing.T) {
        if err != context.Canceled {
                t.Errorf("Unexpected server handshake error: %v", err)
        }
-       if runtime.GOARCH == "wasm" {
-               t.Skip("conn.Close does not error as expected when called multiple times on WASM")
+       if runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
+               t.Skip("conn.Close does not error as expected when called multiple times on GOOS=js or GOOS=wasip1")
        }
        err = conn.Close()
        if err == nil {