Created
December 13, 2016 12:07
-
-
Save josemigallas/9577750d09f87aaaa570c64d5ce8b58e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a folder for WireMock stuff | |
mkdir wiremock; | |
cd wiremock; | |
# Download de standalone version | |
wget http://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-standalone/2.4.1/wiremock-standalone-2.4.1.jar; | |
# Create mappings | |
mkdir mappings; | |
echo '{ "request": { "url": "/", "method": "GET" }, "response": { "status": 200, "fixedDelayMilliseconds": 500, "body": "Hello WireMock!\n" }}' > mappings/hellofi.json; | |
echo '{ "request": { "url": "/fcm/send", "method": "POST" }, "response": { "status": 200, "fixedDelayMilliseconds": 20000, "jsonBody": {"multicast_id": 108,"success": 1,"failure": 0,"canonical_ids": 0,"results": [{ "message_id": "1:08"}]}, "headers": {"Content-Type": "application/json"}}}' > mappings/fcm-send.json; | |
# Run the server | |
java -jar wiremock-standalone-2.4.1.jar --port 3000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can be run directly with: