{"id":37978639,"url":"https://github.com/chronicleprotocol/infestor","last_synced_at":"2026-01-16T18:32:38.383Z","repository":{"id":40364391,"uuid":"439284349","full_name":"chronicleprotocol/infestor","owner":"chronicleprotocol","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-14T11:59:39.000Z","size":143,"stargazers_count":0,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-14T15:04:06.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chronicleprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-17T09:50:07.000Z","updated_at":"2022-01-10T15:16:02.000Z","dependencies_parsed_at":"2022-07-12T13:33:56.776Z","dependency_job_id":null,"html_url":"https://github.com/chronicleprotocol/infestor","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/chronicleprotocol/infestor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicleprotocol%2Finfestor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicleprotocol%2Finfestor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicleprotocol%2Finfestor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicleprotocol%2Finfestor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chronicleprotocol","download_url":"https://codeload.github.com/chronicleprotocol/infestor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicleprotocol%2Finfestor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T18:32:38.286Z","updated_at":"2026-01-16T18:32:38.369Z","avatar_url":"https://github.com/chronicleprotocol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Run Tests](https://github.com/chronicleprotocol/infestor/actions/workflows/lint_test.yml/badge.svg)](https://github.com/chronicleprotocol/infestor/actions/workflows/lint_test.yml)\n\n# Infestor\nLibrary for writing integration tests based for different exchanges.\nIt offers a simple way to mock exchange API responses and test your code.\n\n![Infestor logo!](/infestor.png \"Infestor\")\n\n## Example:\n\n```go\npackage example\n\nimport (\n\t\"os/exec\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/chronicleprotocol/infestor/origin\"\n\n\t\"github.com/chronicleprotocol/infestor\"\n\t\"github.com/chronicleprotocol/infestor/smocker\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc callSetzer(params ...string) (string, error) {\n\tout, err := exec.Command(\"setzer\", params...).Output()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn strings.TrimSpace(string(out)), nil\n}\n\nfunc TestETHBTC(t *testing.T) {\n\tapi := smocker.API{\n\t\tHost: \"http://172.17.0.2\",\n\t\tPort: 8081,\n\t}\n\n\terr := infestor.NewMocksBuilder().\n\t\tReset().\n\t\tAdd(origin.NewExchange(\"binance\").WithSymbol(\"ETH/BTC\").WithPrice(1)).\n\t\tAdd(origin.NewExchange(\"bitfinex\").WithSymbol(\"ETH/BTC\").WithPrice(1)).\n\t\tAdd(origin.NewExchange(\"coinbase\").WithSymbol(\"ETH/BTC\").WithPrice(1)).\n\t\tAdd(origin.NewExchange(\"huobi\").WithSymbol(\"ETH/BTC\").WithPrice(1)).\n\t\tAdd(origin.NewExchange(\"poloniex\").WithSymbol(\"ETH/BTC\").WithPrice(1)).\n\t\tAdd(origin.NewExchange(\"kraken\").WithSymbol(\"XETH/XXBT\").WithPrice(1)).\n\t\tDeploy(api)\n\n\t// Build your test further\n\trequire.NoError(t, err)\n\n\tout, err := callSetzer(\"price\", \"ethbtc\")\n\n\trequire.NoError(t, err)\n\trequire.Equal(t, \"0.5000000000\", out)\n}\n\n// Run your tests with base URL `http://localhost:8080` for your exchanges\n// Example for binance: `http://localhost:8080/api/v3/ticker/price?symbol=ETHBTC`\n\n// it will reply with:\n// {\n//  \"symbol\": \"ETHBTC\",\n//  \"price\": \"1\"\n// }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronicleprotocol%2Finfestor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchronicleprotocol%2Finfestor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronicleprotocol%2Finfestor/lists"}