more updates

This commit is contained in:
2026-01-28 22:42:47 -05:00
parent e04fe8cef3
commit 234c4718a4
4 changed files with 55 additions and 16 deletions

View File

@@ -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)