skip DoJSON test on plan9

This commit is contained in:
Aaron Bieber 2020-10-21 01:05:09 +00:00
parent e27cc689d4
commit 70917abd74

View File

@ -4,6 +4,7 @@ import (
"fmt"
"net/http"
"net/http/httptest"
"runtime"
"testing"
)
@ -33,6 +34,7 @@ type testResp struct {
}
func TestHTTPRequestDoJSON(t *testing.T) {
if runtime.GOOS != "plan9" {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, err := fmt.Fprintln(w, `{"test":"success"}`)
if err != nil {
@ -56,4 +58,5 @@ func TestHTTPRequestDoJSON(t *testing.T) {
if tr.Name != "success" {
t.Errorf("Expected 'test'; got '%s'\n", tr.Name)
}
}
}