Hghar

command module
v0.0.0-...-ea8f82e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2018 License: MIT Imports: 8 Imported by: 0

README

Hghar

Build Status Go Report Card

Lightweight dummy server to mock external services for integration testing.

Installation

go get github.com/YoussefKaib/Hghar
go build ./...
./Hghar

Docker Build

docker-compose up --build

Endpoints Path

testdata/mocked_endpoints/external_moq_services.json

Endpoints Example:

{
   "services": [
       {
           "request":"/foo",
           "status": 200,
           "headers": {
               "Content-Type": "application/json"
           },
           "query_params": {
               "city": ["Chicago"]
           },
           "body": "",
           "response_file": "testdata/mocked_response/foo_file_response"
       },
       {
           "request":"/bar",
           "status": 500,
           "headers": {
               "Content-Type": "application/json"
           },
           "query_params": {
               "city": ["New York"]
           },
           "body": "",
           "response_file": "testdata/mocked_response/bar_file_response"
       }
   ]
}

Response Path

testdata/mocked_response/foo_file_response

Contributing

Pull requests, bug fixes, and new features are welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -a -m 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request on GitHub

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL