Skip to content

Commit

Permalink
Merge pull request #15 from SberMarket-Tech/add_gui_to_wiremock_insta…
Browse files Browse the repository at this point in the history
…nces

Add GUI to wiremock instances - inherit Wiremock GUI by holomekc
  • Loading branch information
wtertius authored May 20, 2024
2 parents 2500e2b + 48343b4 commit 582e1c1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .image-build-args
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GOLANG_IMAGE_TAG="1.21.7"


WIREMOCK_IMAGE_REPO="docker.io"
WIREMOCK_IMAGE_NAME="wiremock/wiremock"
WIREMOCK_IMAGE_TAG="2.32.0-alpine"
WIREMOCK_IMAGE_NAME="holomekc/wiremock-gui"
WIREMOCK_IMAGE_TAG="3.6.7-alpine"

# See COPYRIGHT file.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# grpc-wiremock

[Wiremock](https://wiremock.org/docs) is a great way to test your connected services.
But it has one drawback. And that is support for **proto** contracts.
**grpc-wiremock** is a tool for mocking server API. It provides

**grpc-wiremock** is designed to solve this problem,
and also provide a handy *tool for generating mocks*. And their *automatic reloading*.
* simultaneous work with **multiple APIs**;
* mocking of **grpc (protobuf)** API;
* generating mocks by **proto** and **openapi** files;
* hot reload on contract changes.

**grpc-wiremock** is based on [Wiremock](https://wiremock.org/docs), so it provides the all its power of matchers.
Also it inherites [Wiremock GUI](https://github.com/holomekc/wiremock) made by [holomekc](https://github.com/holomekc).

[Here](docs/comparsion.md) you can compare the functionality with existing solutions.

Expand Down Expand Up @@ -39,6 +43,12 @@ docker run \
-v ${CONTRACTS_PATH}:/proto \
SberMarket-Tech/grpc-wiremock@latest
```

To view status and API mocks

* Open Supervisor GUI on http://localhost:9000.
* Open Wiremock GUI on http://localhost:8000/__admin/webapp

## Overview

In general, **grpc-wiremock** contains two main components.
Expand Down
2 changes: 1 addition & 1 deletion static/supervisord/files/supervisord.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ environment = ROOT="{{ .Root }}",PORT="{{ .Port }}",NAME="{{ .Domain }}"
autorestart = true
redirect_stderr = true
stdout_logfile = /var/log/supervisord/mock-{{ .Domain }}.log
command = java -cp "/var/wiremock/lib/*:/var/wiremock/extensions/*" com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --port {{ .Port }} --root-dir {{ .Root }} --global-response-templating --record-mappings --verbose
command = java -cp "/var/wiremock/lib/*:/var/wiremock/extensions/*" wiremock.Run --port {{ .Port }} --root-dir {{ .Root }} --global-response-templating --record-mappings --verbose

0 comments on commit 582e1c1

Please sign in to comment.