• Stars
    star
    17
  • Rank 1,257,181 (Top 25 %)
  • Language
    Go
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Golang HTTP client testing framework

flute

Mentioned in Awesome Go GoDoc Build Status codecov Go Report Card GitHub last commit GitHub tag License

Golang HTTP client testing framework

Presentation

https://speakerdeck.com/szksh/flute-golang-http-client-testing-framework

Overview

flute is the Golang HTTP client testing framework. The goal is

  • Test request parameters such as the request path, headers and body
  • Mock the HTTP server

flute.Transport implements http.RoundTripper.

flute uses testify's assert internally. You can test the http request parameters with assert.

For example, the following test failure message means the request header is unexpected value.

=== RUN   TestClient_CreateUser
--- FAIL: TestClient_CreateUser (0.00s)
    tester.go:168:
                Error Trace:    tester.go:168
                                                        tester.go:32
                                                        transport.go:25
                                                        client.go:250
                                                        client.go:174
                                                        client.go:641
                                                        client.go:509
                                                        create_user.go:45
                                                        create_user_test.go:56
                Error:          Not equal:
                                expected: []string{"token XXXXX"}
                                actual  : []string{"token "}

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1,3 +1,3 @@
                                 ([]string) (len=1) {
                                - (string) (len=11) "token XXXXX"
                                + (string) (len=6) "token "
                                 }
                Test:           TestClient_CreateUser
                Messages:       the request header "Authorization" should match
                                service: http://example.com
                                request name: create a user

Please see the example.

Example

Please see examples.

License

MIT

More Repositories

1

tfcmt

Fork of mercari/tfnotify. tfcmt enhances tfnotify in many ways, including Terraform >= v0.15 support and advanced formatting options
Go
273
star
2

tfaction

GitHub Actions collection for Opinionated Terraform Workflow
TypeScript
177
star
3

github-comment

CLI to create and hide GitHub comments
Go
64
star
4

go-graylog

Graylog API client for Go and terraform provider for Graylog
Go
45
star
5

circleci-config-merge

Generate .circleci/config.yml by merging multiple files
Go
12
star
6

github-action-renovate-config-validator

GitHub Actions for renovate-config-validator
12
star
7

ansible-pyenv-module

ansible module to run pyenv command
Python
11
star
8

ci-info

CLI tool to get CI related information
Go
11
star
9

akoi

Deprecated: Please use aqua
Go
8
star
10

tfaction-getting-started

Getting Started with tfaction
HCL
8
star
11

tfaction-example

Example usage of tfaction
HCL
8
star
12

ghalint

GitHub Actions linter
Go
7
star
13

ansible-docker-ce-centos

ansible role to install Docker CE on CentOS
Ruby
7
star
14

resume

6
star
15

go-ci-env

Go library to get CI meta data from the environment variables.
Go
6
star
16

tfmigrator

CLI tool to migrate Terraform configuration and State
Go
6
star
17

github-action-tflint

GitHub Actions for tflint
TypeScript
6
star
18

asciinema-trim

Trim and change the playback speed of asciinema's session
Go
6
star
19

terraform-aws-tfaction

Terraform Modules for tfaction (AWS resources)
HCL
5
star
20

cmdx

Task runner. It provides useful help messages and supports interactive prompts and validation of arguments
Go
5
star
21

ansible-pyenv

ansible role to install pyenv
Python
5
star
22

github-action-terraform-init

GitHub Actions to run terraform init
Shell
4
star
23

alpine-sudo.docker

4
star
24

github-action-golangci-lint

GitHub Actions for golangci-lint
Go
4
star
25

profile

Self introduction of suzuki-shunsuke
JavaScript
4
star
26

github-action-format

GitHub Actions to format code and push commit
Shell
4
star
27

yaml2json

Convert YAML to JSON
Go
4
star
28

renovate-autoclose-action

GitHub Actions to close Renovate failed pull requests automatically
TypeScript
4
star
29

renovate-issue-action

Create, update, and close GitHub Issues with GitHub Actions according to Renovate Pull Requests
Go
4
star
30

go-dataeq

Go library to check if two values are equal as data format such as JSON
Go
4
star
31

ansible-gvm

ansible role to install gvm
4
star
32

issue

4
star
33

github-ci-monitor

Monitor GitHub repositories CI statues by DataDog
Go
4
star
34

dd-time

CLI tool to post the command execution time as time-series data to DataDog
Go
3
star
35

ansible-pyenv-virtualenv

ansible role to install pyenv-virtualenv
Ruby
3
star
36

generator-ss-ansible-playbook

yeoman generator for ansible playbook
JavaScript
3
star
37

go-convmap

Go library to convert map[interface{}]interface{} to map[string]interface{}
Go
3
star
38

lambuild

Empower AWS CodeBuild whose source provider is GITHUB. Provide great features like multiple buildspec supports, conditional builds and commands, etc.
Go
3
star
39

generator-ss-go-cli

yeoman generator to develop cli tool with Golang
Go
3
star
40

github-action-tfsec

GitHub Actions for tfsec
TypeScript
3
star
41

go-findconfig

Go library to find configuration file
Go
3
star
42

go-error-handling-logging-practice

(deprecated) Golang application (not library)'s error handling and logging practice
Shell
3
star
43

github-action-actionlint

GitHub Actions for actionlint
3
star
44

aws-iam-cred-sender

AWS Lambda Function to send an initial password to a new user via Slack DM
Go
3
star
45

go-timeout

Golang library to treat the timeout of the external command
Go
3
star
46

matchfile

CLI tool to check file paths are matched to the condition
Go
3
star
47

testlink.docker

3
star
48

my-aqua-config

aqua's personal configuration
3
star
49

akoi-installer

GitHub Actions and Shell Script to install suzuki-shunsuke/akoi
TypeScript
3
star
50

discussion-slack-notifier

Notify GitHub Discussions events to Slack with GitHub Actions
Go
3
star
51

skaffold-generator

CLI tool to generate skaffold.yaml to build and deploy only required services
Go
3
star
52

ansible-git-lfs-ubuntu

ansible role to install git-lfs on Ubuntu
Python
3
star
53

example-circleci-config-merge

Example usage of circleci-config-merge
Shell
2
star
54

durl

CLI tool to check whether dead urls are included in files
Go
2
star
55

github-action-opa-fmt

GitHub Actions to run `opa fmt`
2
star
56

ansible-go-module

ansible module to manage go packages with go command
Python
2
star
57

slides

CSS
2
star
58

update-commit-status-action

GitHub Actions to update commit status according to job results
TypeScript
2
star
59

go-release-workflow

GitHub Actions Reusable Workflow for Go Application
2
star
60

renovate-github-tags-datasource-repositories

Renovate github-tags Datasource Repositories
HCL
2
star
61

example-drone-build-parameter

Shell
2
star
62

github-action-shfmt

GitHub Actions to run shfmt
2
star
63

pinact-action

GitHub Actions to pin GitHub Actions by pinact
2
star
64

go-osenv

Go small library to mock os.Getenv
Go
2
star
65

test-renovate-3

2
star
66

example-drone-kubernetes-runner

Running Drone Kubernetes Runner at local
Shell
2
star
67

ansible-ghq-module

ansible module to clone git repositories with motemen/ghq
Python
2
star
68

generator-ss-go-echo

yeoman generator for web application made with echo
Go
2
star
69

katacoda-scenarios

Katacoda Scenarios
2
star
70

renovate-config

Jsonnet
2
star
71

zap-error

Embed zap.Field into error
Go
2
star
72

aws-rds-aurora-postgresql

AWS RDS available Engine versions - Aurora PostgreSQL
2
star
73

github-action-shellcheck

GitHub Actions for shellcheck
Shell
2
star
74

ansible-tmux-tpm

ansible role to install tmux-plugins/tpm
Python
2
star
75

github-action-terraform-fmt

GitHub Actions to run `terraform fmt`
2
star
76

github-action-validate-envoy-proxy

GitHub Actions to validate Envoy Proxy Configuration File
2
star
77

example-opa-table-driven-tests

Example of OPA's Policy Tests like Table Driven Tests
Open Policy Agent
2
star
78

go-test-full-workflow

GitHub Actions Reusable Workflow to test Go application
2
star
79

aws-elasticache-memcached

AWS Elasticache for Memcached available Engine versions
2
star
80

ansible-pyenv-ubuntu

ansible role to install pyenv and python build dependencies on Ubuntu (deprecated)
Ruby
2
star
81

oss-contribution-guide

Guide to creating GitHub Issues and Pull Requests for OSS Contribution
2
star
82

go-mod-tidy-action

GitHub Actions to run `go mod tidy` and push a commit to a pull request
2
star
83

example-github-actions-dynamic-matrix

Example of GitHub Actions Workflow which run matrix build dynamically according to changed files in the pull request
Shell
2
star
84

zerolog-error

Embed fields into error for zerolog
Go
2
star
85

test-renovate

2
star
86

homebrew-ci-info

Ruby
2
star
87

go-test-workflow

GitHub Actions Reusable Workflow for testing Go application
2
star
88

ansible-docker_service-dep

ansible role to install docker_service module dependencies
Ruby
2
star
89

test-github-action

Go
2
star
90

notify-workflow-error-action

Action to notify the failure of GitHub Actions Workflow to a GitHub Issue
2
star
91

reenable-automerge-action

GitHub Actions to re-enable disabled GitHub Automerge
2
star
92

renovate-issue-action-docs

Document of renovate-issue-action
JavaScript
2
star
93

github-actions-renovate-github-tags-data-source

GitHub Actions to update version file and push tags
Shell
2
star
94

ansible-hashicorp-binary

ansible role to install Hashicorp's binary
Ruby
2
star
95

logrus-error

Embed logrus.Fields into error
Go
2
star
96

github-token-action

GitHub Actions to output a GitHub Access Token
2
star
97

aws-elasticache-redis

AWS Elasticache for Redis available Engine versions
2
star
98

slack-bot-file-monitor

slack bot to monitor file uploads
Go
2
star
99

actionlint-workflow

GitHub Actions Workflow for actionlint
2
star
100

tfcmt-docs

Document of suzuki-shunsuke/tfcmt
JavaScript
2
star