{"id":13413871,"url":"https://github.com/suzuki-shunsuke/flute","last_synced_at":"2025-04-15T05:55:06.441Z","repository":{"id":42872248,"uuid":"195497541","full_name":"suzuki-shunsuke/flute","owner":"suzuki-shunsuke","description":"Golang HTTP client testing framework","archived":false,"fork":false,"pushed_at":"2025-04-14T13:31:00.000Z","size":600,"stargazers_count":20,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T05:55:01.052Z","etag":null,"topics":["golang","library","mock","oss","testing"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/suzuki-shunsuke/flute/flute","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suzuki-shunsuke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["suzuki-shunsuke"]}},"created_at":"2019-07-06T04:32:03.000Z","updated_at":"2025-04-14T13:31:03.000Z","dependencies_parsed_at":"2024-08-28T19:07:15.553Z","dependency_job_id":"8d3c5506-b002-424e-9628-3cb8d1b1347f","html_url":"https://github.com/suzuki-shunsuke/flute","commit_stats":{"total_commits":234,"total_committers":4,"mean_commits":58.5,"dds":0.5726495726495726,"last_synced_commit":"7a89474118cc4f5ea02c83658f1957ba711799b2"},"previous_names":["suzuki-shunsuke/fagott"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fflute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fflute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fflute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fflute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suzuki-shunsuke","download_url":"https://codeload.github.com/suzuki-shunsuke/flute/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016320,"owners_count":21198832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","library","mock","oss","testing"],"created_at":"2024-07-30T20:01:51.626Z","updated_at":"2025-04-15T05:55:06.415Z","avatar_url":"https://github.com/suzuki-shunsuke.png","language":"Go","funding_links":["https://github.com/sponsors/suzuki-shunsuke"],"categories":["Testing","测试","Template Engines","测试相关`测试库和测试数据集生成库`","测试相关","Testing Frameworks"],"sub_categories":["HTTP Clients","HTTP客户端","Testing Frameworks","查询语"],"readme":"# flute\n\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)\n[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/suzuki-shunsuke/flute/flute)\n[![Go Report Card](https://goreportcard.com/badge/github.com/suzuki-shunsuke/flute)](https://goreportcard.com/report/github.com/suzuki-shunsuke/flute)\n[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/suzuki-shunsuke/flute/main/LICENSE)\n\nGolang HTTP client testing framework\n\n## Presentation\n\nhttps://speakerdeck.com/szksh/flute-golang-http-client-testing-framework\n\n## Overview\n\n`flute` is the Golang HTTP client testing framework.\nThe goal is\n\n* Test request parameters such as the request path, headers and body\n* Mock the HTTP server\n\n`flute.Transport` implements [http.RoundTripper](https://golang.org/pkg/net/http/#RoundTripper).\n\n`flute` uses [testify](https://github.com/stretchr/testify)'s assert internally.\nYou can test the http request parameters with assert.\n\nFor example, the following test failure message means the request header is unexpected value.\n\n```console\n=== RUN   TestClient_CreateUser\n--- FAIL: TestClient_CreateUser (0.00s)\n    tester.go:168:\n                Error Trace:    tester.go:168\n                                                        tester.go:32\n                                                        transport.go:25\n                                                        client.go:250\n                                                        client.go:174\n                                                        client.go:641\n                                                        client.go:509\n                                                        create_user.go:45\n                                                        create_user_test.go:56\n                Error:          Not equal:\n                                expected: []string{\"token XXXXX\"}\n                                actual  : []string{\"token \"}\n\n                                Diff:\n                                --- Expected\n                                +++ Actual\n                                @@ -1,3 +1,3 @@\n                                 ([]string) (len=1) {\n                                - (string) (len=11) \"token XXXXX\"\n                                + (string) (len=6) \"token \"\n                                 }\n                Test:           TestClient_CreateUser\n                Messages:       the request header \"Authorization\" should match\n                                service: http://example.com\n                                request name: create a user\n```\n\nPlease see [the example](https://github.com/suzuki-shunsuke/flute/blob/v0.6.0/examples/create_user_test.go#L21-L48).\n\n## Example\n\nPlease see [examples](examples).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzuki-shunsuke%2Fflute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuzuki-shunsuke%2Fflute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzuki-shunsuke%2Fflute/lists"}