/wiremock-advanced

A example Image for extending a wiremock, with static content, controlled by nginx based on fedora.

Primary LanguageJavaScriptMIT LicenseMIT

wiremock-advanced

A example Image for extending a wiremock, with static content, controlled by nginx based on fedora.

wiremock nginx docker

TODOS

  • ✅ add newman
  • ✅ add enpoint that returns all postman-collection names
  • ✅ add enpoint that takes name of the postman-collection to execute
  • 🕵️‍♂️ Newman Manager - still in progress
  • ✅ add Newman Manager to image
  • add collection that calls wiremock mockdata
  • 🔌👨‍💼 Wiremock-Manager
    • Dashboard-Page
      • is wiremock up
      • number of mappings
      • number of journal-entries
    • Mappings-Manager
      • list all stored mappings
      • add a new mapping (as text)
      • add a new mapping - postman-editor style

How to create the image

Example:

docker build -t wm-adv:v1 .

How to run the container

Example:

docker run -p 8090:80 -p 3000:3000 -p 4000:4000 wm-adv:v1

Execute Newman

Test container

Show index.html of static content

curl http://localhost:8090

or http://localhost:8090/ (Root-Site for static-content)

Root-Site for static-content

Show wiremock mappings

curl http://localhost:8090/api/__admin/mappings

or http://localhost:8090/api/__admin/mappings

Mocked Data

Git Setup

Avoid: >LF will be replaced by CRLF the next time Git touches it

git config --global core.autocrlf false

Nice to know

Start official wiremock container

docker run -it --rm \
  -p 8080:8080 \
  --name wiremock \
  wiremock/wiremock:3.5.4

Nginx commands