Skip to content

Commit 1f7c62c

Browse files
drakkangopherbot
authored andcommitted
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 <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]>
1 parent a5f8048 commit 1f7c62c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

ssh/test/recording_client_test.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"os"
1414
"os/exec"
1515
"path/filepath"
16+
"runtime"
1617
"strconv"
1718
"strings"
1819
"sync"
@@ -232,8 +233,8 @@ func (test *clientTest) run(t *testing.T, write bool) {
232233

233234
func recordingsClientConfig() *ssh.ClientConfig {
234235
config := clientConfig()
235-
// Remove ML-KEM since it only works with Go 1.24.
236236
config.SetDefaults()
237+
// Remove ML-KEM since it only works with Go 1.24.
237238
if config.KeyExchanges[0] == "mlkem768x25519-sha256" {
238239
config.KeyExchanges = config.KeyExchanges[1:]
239240
}
@@ -322,6 +323,9 @@ func TestBannerCallback(t *testing.T) {
322323
}
323324

324325
func TestRunCommandSuccess(t *testing.T) {
326+
if runtime.GOARCH == "wasm" {
327+
t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm")
328+
}
325329
test := clientTest{
326330
name: "RunCommandSuccess",
327331
config: recordingsClientConfig(),
@@ -361,6 +365,9 @@ func TestHostKeyCheck(t *testing.T) {
361365
}
362366

363367
func TestRunCommandStdin(t *testing.T) {
368+
if runtime.GOARCH == "wasm" {
369+
t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm")
370+
}
364371
test := clientTest{
365372
name: "RunCommandStdin",
366373
config: recordingsClientConfig(),
@@ -387,6 +394,9 @@ func TestRunCommandStdin(t *testing.T) {
387394
}
388395

389396
func TestRunCommandStdinError(t *testing.T) {
397+
if runtime.GOARCH == "wasm" {
398+
t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm")
399+
}
390400
test := clientTest{
391401
name: "RunCommandStdinError",
392402
config: recordingsClientConfig(),
@@ -414,6 +424,9 @@ func TestRunCommandStdinError(t *testing.T) {
414424
}
415425

416426
func TestRunCommandFailed(t *testing.T) {
427+
if runtime.GOARCH == "wasm" {
428+
t.Skip("skipping test, executing a command, session.Run(), is not supported on wasm")
429+
}
417430
test := clientTest{
418431
name: "RunCommandFailed",
419432
config: recordingsClientConfig(),
@@ -437,6 +450,9 @@ func TestRunCommandFailed(t *testing.T) {
437450
}
438451

439452
func TestWindowChange(t *testing.T) {
453+
if runtime.GOARCH == "wasm" {
454+
t.Skip("skipping test, stdin/out are not supported on wasm")
455+
}
440456
test := clientTest{
441457
name: "WindowChange",
442458
config: recordingsClientConfig(),

0 commit comments

Comments
 (0)