Skip to content

Commit e7fad00

Browse files
committed
Skip failing tests on darwin and windows
1 parent 034cfa6 commit e7fad00

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

pty/ptytest/ptytest_test.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package ptytest_test
22

33
import (
44
"fmt"
5+
"runtime"
56
"strings"
67
"testing"
78

@@ -25,19 +26,22 @@ func TestPtytest(t *testing.T) {
2526
t.Parallel()
2627

2728
tests := []struct {
28-
name string
29-
output string
29+
name string
30+
output string
31+
isPlatformBug bool // See https://github.com/coder/coder/issues/2122.
3032
}{
3133
{name: "1024 is safe (does not exceed macOS buffer)", output: strings.Repeat(".", 1024)},
32-
{name: "1025 exceeds macOS buffer (must not hang)", output: strings.Repeat(".", 1025)},
33-
{name: "10241 large output", output: strings.Repeat(".", 10241)}, // 1024 * 10 + 1
34+
{name: "1025 exceeds macOS buffer (must not hang)", output: strings.Repeat(".", 1025), isPlatformBug: true},
35+
{name: "10241 large output", output: strings.Repeat(".", 10241), isPlatformBug: true}, // 1024 * 10 + 1
3436
}
3537
for _, tt := range tests {
3638
tt := tt
3739
// nolint:paralleltest // Avoid parallel test to more easily identify the issue.
3840
t.Run(tt.name, func(t *testing.T) {
39-
// Example with cobra command instead of exec. More abstractions, but
40-
// for some reason works on linux.
41+
if tt.isPlatformBug && (runtime.GOOS == "darwin" || runtime.GOOS == "windows") {
42+
t.Skip("This test does not (currently) work on macOS or Windows")
43+
}
44+
4145
cmd := cobra.Command{
4246
Use: "test",
4347
RunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy