Skip to content

Dummy HTTP Server to be used by the e2e/integration tests

License

Notifications You must be signed in to change notification settings

sv-tools/mock-http-server

Repository files navigation

mock-http-server

Code Analysis GitHub tag (latest SemVer)

A simple HTTP Server to be used for the unit or end-to-end or integrations tests.

  • yaml based configuration, see an example config file.
  • docker image is published in this repo and on the docker hub

Usage

docker run -p 8080:8080 -v $(pwd)/example_config.yaml:/config.yaml -e CONFIG=config.yaml ghcr.io/sv-tools/mock-http-server:latest

in second shell

curl http://localhost:8080/users -H"X-Request-Id: 123"
> {"id":1,"name":"John","id":2,"name":"Jane"}

curl http://localhost:8080/users/1 -H"X-Request-Id: 123"
> {"id":1,"name":"John"}

License

MIT licensed. See the bundled LICENSE file for more details.

About

Dummy HTTP Server to be used by the e2e/integration tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published