Giter VIP home page Giter VIP logo

psmockserver's Introduction

psmockserver

psmockserver is a MockServer(https://mock-server.com) implementation in Go.

Features

  • Test hooks
  • Integration tests #8
  • Support query strings #7
  • Base helm chart@v2 setup #12
  • Clear mocks using cookies/headers #10
  • Validate request body

How To

Install dependencies

  1. Go >1.13 https://golang.org/
  2. Realize https://github.com/oxequa/realize - for development
  3. Goreleaser https://goreleaser.com/ - for release
  4. Docker https://www.docker.com/ - for test

Run server locally

  1. make dev

Run test locally

  1. make test

Run docker

  1. docker build -t psmarcin/psmockserver .
  2. docker run -d -p 8080:8080 psmarcin/psmockserver

Run mock-tests

  1. make mock-test

Load default mocks from file

psmockserver loads by default file ./default.json.

psmockserver's People

Contributors

psmarcin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

psmockserver's Issues

Clear mocks using cookies/headers

We need to be able to clear mocks for specific cookie/headers.
For instance we want to mock requests with specific sessionId send in headers and later clear all mock with that header.

queryStringParameters - format

format of queryStringParameters is differend then mock-server which is:
[ { "name": "catalogIds", "values": [ "4646048" ] } ]

Clear mock by method/path

We need a way to clear only mocks on one path/method. Sometimes we will have to remove multiple mocks per path/method.

concurrent map writes

[INFO]  [:32] POST /mockserver
fatal error: concurrent map writes
fatal error: concurrent map writes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.