Commit graph naco-api/testClient
Author SHA1 Message Date
debd49d6f6
chore: quiet errcheck/staticcheck across server, platform, and test clients 2026-09-08 01:29:28 +00:00
2c8f09fdbf
Split test clients into REST and MCP, add MCP endpoint tests
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 1m32s
CI/CD Go Verification / build_and_test (push) Successful in 1m14s
Rename testClient/main.go into testClient/rest/test-rest-endpoints.go and add
testClient/mcp/test-mcp-endpoints.go which tests the /mcp Streamable HTTP
endpoint via an x402-aware MCP client. Update the test-endpoints workflow to
run the MCP tests first, and decode/print the 402 challenge when a paid REST
retry is rejected.
2026-09-06 18:27:09 +00:00
6e0a57063c
Increase all timeouts to 600s for CPU-only Ollama
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 5m31s
CI/CD Go Verification / build_and_test (push) Successful in 1m15s
- internal/x402/x402.go: x402 middleware timeout 240s -> 600s; facilitator client timeout 30s default -> 600s
- testClient/main.go: test client HTTP timeout 240s -> 600s
- cmd/server/main.go: Ollama HTTP client timeout 120s -> 600s

All timeouts increased to 10 minutes to accommodate CPU-only Ollama inference.
Calls return as soon as possible; timeouts only act as safety net.
2026-09-05 08:52:06 +00:00
6c75d869b2
Increase timeouts to 240s for settlement and test client
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 4m5s
CI/CD Go Verification / build_and_test (push) Successful in 1m14s
- internal/x402/x402.go: x402 middleware Timeout 120s -> 240s
  (covers payment verification + handler execution + settlement)
- testClient/main.go: test client HTTP timeout 180s -> 240s
  (matches server-side timeout for end-to-end payment + handler + settlement)

Provides adequate buffer for slow facilitator /settle responses during
getStyleProfile and findSimilarUsers tool execution.
2026-09-05 02:42:55 +00:00
79e2a2348c
Fix getPost test client field name: actor -> author
- testClient/main.go:139: Changed JSON field from 'actor' to 'author' to match GetPostRequest schema
- The handler expects 'author' field, test client was sending 'actor' causing validation error
2026-09-05 01:59:29 +00:00
9609f68b6c
Increase test client timeout to 180s for slow Ollama embeddings
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 3m56s
CI/CD Go Verification / build_and_test (push) Successful in 1m12s
- testClient/main.go:120: Timeout 60s -> 180s to accommodate
  server-side Ollama embedding generation (~60s) after payment retry
- Matches server-side 120s x402 middleware timeout + 120s Ollama HTTP client timeout
- Allows getStyleProfile and findSimilarUsers to complete after payment
2026-09-05 01:43:01 +00:00
28b65cd1bf
Update testclient to register both exact and upto EVM schemes
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 1m25s
CI/CD Go Verification / build_and_test (push) Successful in 1m4s
The test client now registers both 'exact' and 'upto' EVM payment schemes
for the test network (eip155:84532 / Base Sepolia) to match the server's
scheme registration. This allows the x402 HTTP client wrapper to
automatically handle 402 Payment Required responses by selecting and
paying with a supported scheme, then retrying the request.
2026-09-04 14:44:42 +00:00
6dc5b3c3f0
fix: testclient fails on non-2xx (except 402)
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 1m24s
CI/CD Go Verification / build_and_test (push) Successful in 1m6s
callEndpoint now returns error for any HTTP status >= 400 except 402,
which is the expected status for payable endpoints. Previously 500
errors were treated as success, masking server errors like
'no scheme server for exact on eip155:84532'.
2026-09-04 12:11:06 +00:00
a59cee1d2a
chore: cleanup manual funding scripts and docs
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 1s
CI/CD Go Verification / build_and_test (push) Successful in 1m8s
- cdpScripts/listServices.py: fix filter to only api.naco.li resources
  (remove stray type != http check)
- cdpScripts/rescueFunds.py: add CDP export script for api-naco-li
- testClient/main.go: remove faucet/balance/funding logic (manual funding),
  drop go-ethereum abi/ethclient, big, json, context imports; keep
  x402 payment flow only
- AGENTS.md: document quick commands, architecture, codegen, migrations,
  testing patterns and gotchas
2026-09-03 23:59:22 +00:00
ee0589c774 chore: tidy store integration test and deps
- remove tautological SaveTransaction SQL/Params constant checks (const string replay)
- go.mod tidy drops unused go-sqlmock indirect
- testClient/main.go: gofmt alignment
2026-09-03 17:00:45 +00:00
027a4ee5e9 test: add auto-funding to test client and fix CI workflow
- testClient: add ensureFundedWallet() with USDC/ETH balance checks and faucet requests
- fund-wallet.sh: update faucet format for Coinbase CDP API
- start-test-server.sh: use Coinbase facilitator URL, add payment endpoint verification
- test-endpoints.yaml: fund test wallet before server, pass RPC/Faucet URLs to test client
2026-09-01 23:39:14 +02:00
dbf0e2591b add: supported network config option
update: align testClient with x402-v2
2026-08-03 12:40:04 +00:00
5ca7f55ddf fix: log client ip 2025-12-21 01:53:10 +00:00
2b4980edab Major changes 2025-12-19 00:05:45 +00:00
5b409678ad First release build 2025-12-02 19:32:47 +00:00