All Projects → Trendyol → Gaos

Trendyol / Gaos

Licence: apache-2.0
HTTP mocking to test API services for chaos scenarios

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gaos

Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+1705.24%)
Mutual labels:  api, mocking
Gock
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
Stars: ✭ 1,185 (+520.42%)
Mutual labels:  api, mocking
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+32.46%)
Mutual labels:  api, mocking
Duckrails
Development tool to mock API endpoints quickly and easily (docker image available)
Stars: ✭ 1,690 (+784.82%)
Mutual labels:  api, mocking
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-74.35%)
Mutual labels:  api, mocking
Examples
Examples of Mock Service Worker usage with various frameworks and libraries.
Stars: ✭ 163 (-14.66%)
Mutual labels:  api, mocking
Testify
A toolkit with common assertions and mocks that plays nicely with the standard library
Stars: ✭ 14,996 (+7751.31%)
Mutual labels:  mocking
Blog Service
blog service @nestjs
Stars: ✭ 188 (-1.57%)
Mutual labels:  api
Smudge
Control the Spotify app from within Emacs.
Stars: ✭ 186 (-2.62%)
Mutual labels:  api
Stock Market India
API for Indian Stock Market's NSE and BSE.
Stars: ✭ 185 (-3.14%)
Mutual labels:  api
Aws Lambda Fastify
Insipired by aws-serverless-express to work with Fastify with inject functionality.
Stars: ✭ 190 (-0.52%)
Mutual labels:  api
Flexirest
Flexirest - The really flexible REST API client for Ruby
Stars: ✭ 188 (-1.57%)
Mutual labels:  api
Espn Fantasy Football Api
Connect to ESPN's fantasy football API via this JS API client for web and NodeJS. Available as an npm package.
Stars: ✭ 188 (-1.57%)
Mutual labels:  api
Learn Anything
Organize world's knowledge, explore connections and curate learning paths
Stars: ✭ 13,532 (+6984.82%)
Mutual labels:  api
Janus
An API Gateway written in Go
Stars: ✭ 2,249 (+1077.49%)
Mutual labels:  api
Wxpy
微信机器人 / 可能是最优雅的微信个人号 API ✨✨
Stars: ✭ 13,057 (+6736.13%)
Mutual labels:  api
Virustotal Api
Virus Total Public/Private/Intel API
Stars: ✭ 189 (-1.05%)
Mutual labels:  api
Alidayu
阿里大于(鱼)API接口-SDK
Stars: ✭ 186 (-2.62%)
Mutual labels:  api
Django Mock Queries
A library for mocking django queryset functions in memory for testing
Stars: ✭ 187 (-2.09%)
Mutual labels:  mocking
Api
API that uncovers the technologies used on websites and generates thumbnail from screenshot of website
Stars: ✭ 189 (-1.05%)
Mutual labels:  api

GAOS

HTTP mocking to test API services for chaos scenarios

Apache 2.0 Go Report Build Status GitHub release


Gaos, can create and provide custom mock restful services via using your fully-customizable scenarios and runs them on Docker & Kubernetes & localhost flawlessly.

Warning: Currently in Beta.

asciicast

Features

  • API response mocking
  • Custom behaviour scenarios
  • Create custom actions for each scenario
  • Robust routing
  • Serve static & dynamic responses
  • Duration, Latency, Error scenarios
  • Deploy your services on Docker & K8S
  • ... and much more, explore the Gaos!

Installation

  • Via HomeBrew
$ brew tap trendyol/trendyol-tap
$ brew install gaos
  • Via Go
$ go get -u github.com/Trendyol/gaos 
  • Build on Docker
$ make build

Scenarios

Scenario Explanation
latency Adds extra latency for request
duration Adds duration limit for request
span Executes accept if in the specified time range, ignore otherwise.
rate Executes ignore if reaches the value or on multiples of, accept otherwise.

Actions

Action Explanation
accept Execute if span and rate conditions doesn't match in the specified scenario
ignore Execute if span and rate conditions does match in the specified scenario
direct Specifies which scenario should be handled by next request
result Specifies Result Type that will be return eventually
status Specifies Status Code for given Result Type

Results

Result Explanation
type Result Type of the content
content Definitions the relevant result's content, according to Result Type

Result Type

Result Type Explanation
static Returns json content
file Returns content.type after reading the file in content.path
redirect Sends request to remote content.host and awaits response (reverse proxy)

Usage

Usage:
  gaos [command]

Available Commands:
  help        Help about any command
  run         Run Gaos server on localhost
  start       Start Gaos server on given engine (Docker, K8S)

Flags:
  -h, --help   help for gaos

Run Command

Run Gaos server on your localhost

Usage:
  gaos run [flags]

Flags:
  -x, --execute string    execute scenario services
  -s, --scenario string   scenario file input (default "./scenario.json")

Example:

$ gaos run -s ./examples/example.json

After Gaos server started:

$ go run ./examples/example.go

Start Command

Start Gaos server on given engine (Docker, K8S)

Usage:
  gaos start [flags]

Flags:
  -c, --config string        choose k8s config (default "minikube")
      --cpu string           cpu limit (default "500m")
  -e, --environment string   gaos running environment {docker, k8s} (default "local")
	  --memory string        memory limit (default "500mi")
  -n, --namespace string     choose namespace (default "default")
  -p, --password string      image registry password
  -r, --registry string      image registry
	  --replica string       replica count (default "1")
  -s, --scenario string      scenario file input (default "./scenario.json")
	  --secret string        secret key name
  -t, --timeout string       client timeout (default "5m")
  -u, --username string      image registry username
  • Example: Docker
$ gaos start -e docker -s './examples/example.json'
  • Example: Kubernetes
$ gaos start -e k8s -s './examples/example.json'

Running Tests

Requirements:

$ bats e2e.bats

Known Issues

  • Lack of some unit tests
  • E2E tests are not running on pipeline yet. (Manually: bats e2e.bats)
  • Not tested in Windows yet

TO-DO

  • [ ] Add ./docs folder for better documentation
  • [ ] Scenario linter - to check rules, keys and paths
  • [ ] Remote server config reader
  • [ ] API client
  • [ ] Envoy support - sidecar feature
  • [ ] Consul support - service mesh feature

License

The base project code is licensed under Apache License unless otherwise specified. Please see the LICENSE file for more information.

GAOS

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].