diff options
| author | Nicola Murino <nicola.murino@gmail.com> | 2025-04-16 11:16:15 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-04-16 08:28:17 -0700 |
| commit | 1f7c62cd66d3486a9cbcec5a4614c0414e9c8dab (patch) | |
| tree | e271de3bcd665287fc316c9225798134ebc83ce8 | |
| parent | a5f804889e33b2a69e6dc8aba18a771bae29a08f (diff) | |
| download | go-x-crypto-1f7c62cd66d3486a9cbcec5a4614c0414e9c8dab.tar.xz | |
ssh/test: skip unsupported tests on js/wasm
This fixes the build on the js/wasm builder.
Change-Id: Icd891cd38b9da07279b9afaa168f7c64c81e13fe
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/665095
Auto-Submit: Nicola Murino <nicola.murino@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
| -rw-r--r-- | ssh/test/recording_client_test.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ssh/test/recording_client_test.go b/ssh/test/recording_client_test.go index 4493e53..167dba9 100644 --- a/ssh/test/recording_client_test.go +++ b/ssh/test/recording_client_test.go @@ -13,6 +13,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "strconv" "strings" "sync" @@ -232,8 +233,8 @@ func (test *clientTest) run(t *testing.T, write bool) { func recordingsClientConfig() *ssh.ClientConfig { config := clientConfig() - // Remove ML-KEM since it only works with Go 1.24. config.SetDefaults() + // Remove ML-KEM since it only works with Go 1.24. if config.KeyExchanges[0] == "mlkem768x25519-sha256" { config.KeyExchanges = config.KeyExchanges[1:] } @@ -322,6 +323,9 @@ func TestBannerCallback(t *testing.T) { } func TestRunCommandSuccess(t *testing.T) { + if runtime.GOARCH == "wasm" { + t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm") + } test := clientTest{ name: "RunCommandSuccess", config: recordingsClientConfig(), @@ -361,6 +365,9 @@ func TestHostKeyCheck(t *testing.T) { } func TestRunCommandStdin(t *testing.T) { + if runtime.GOARCH == "wasm" { + t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm") + } test := clientTest{ name: "RunCommandStdin", config: recordingsClientConfig(), @@ -387,6 +394,9 @@ func TestRunCommandStdin(t *testing.T) { } func TestRunCommandStdinError(t *testing.T) { + if runtime.GOARCH == "wasm" { + t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm") + } test := clientTest{ name: "RunCommandStdinError", config: recordingsClientConfig(), @@ -414,6 +424,9 @@ func TestRunCommandStdinError(t *testing.T) { } func TestRunCommandFailed(t *testing.T) { + if runtime.GOARCH == "wasm" { + t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm") + } test := clientTest{ name: "RunCommandFailed", config: recordingsClientConfig(), @@ -437,6 +450,9 @@ func TestRunCommandFailed(t *testing.T) { } func TestWindowChange(t *testing.T) { + if runtime.GOARCH == "wasm" { + t.Skip("skipping test, stdin/out are not supported on wasm") + } test := clientTest{ name: "WindowChange", config: recordingsClientConfig(), |
