more updates
This commit is contained in:
@@ -32,10 +32,15 @@ func TestFetch(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFetchHTTPBin(t *testing.T) {
|
||||
t.Skip("httpbin.org test is flaky")
|
||||
ctx := context.Background()
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
_, _ = w.Write([]byte(`{"args":{}}`))
|
||||
}))
|
||||
defer server.Close()
|
||||
|
||||
result, err := Fetch(ctx, FetchArgs{Input: "https://httpbin.org/get"})
|
||||
result, err := Fetch(ctx, FetchArgs{Input: server.URL})
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.True(t, result.OK)
|
||||
|
||||
Reference in New Issue
Block a user