https://github.com/laviua/komock
KoMock - Simple HTTP/Consul/SpringConfig http server framework written in Kotlin. Wiremock use cases
https://github.com/laviua/komock
consul http kotlin mocking ssl
Last synced: 17 days ago
JSON representation
KoMock - Simple HTTP/Consul/SpringConfig http server framework written in Kotlin. Wiremock use cases
- Host: GitHub
- URL: https://github.com/laviua/komock
- Owner: laviua
- License: apache-2.0
- Created: 2017-01-21T16:05:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T13:06:36.000Z (about 7 years ago)
- Last Synced: 2023-07-07T15:12:47.522Z (over 2 years ago)
- Topics: consul, http, kotlin, mocking, ssl
- Language: Kotlin
- Homepage:
- Size: 243 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Komock [](https://travis-ci.org/laviua/komock) [](http://www.apache.org/licenses/LICENSE-2.0) []() [](https://codeclimate.com/github/laviua/komock)
Here is HTTP/Consul/SpringConfig mocker framework written in Kotlin.
This tiny framework is very useful if you need to create REST based client for API service.
We use this framework for develop microservices or API integration with third party systems.
Main features:
- Configurable response for any kind of HTTP request/response with wildcards, cookies and custom headers.
- SSL support
- Virtual Host support
- Consul discovery service support.
- Ability to work like a simple Spring Configuration Server
- Header based security
- Variables in the response by request parameters
- Callback support
## Download
Binaries are available at
https://github.com/laviua/komock/releases/latest
[Changelog](https://github.com/laviua/komock/blob/master/changelog.md)
## Maven Central repository
ua.com.lavi
komock-core
RELEASE
## How to use
Run standalone application:
1. Extract release version from https://github.com/laviua/komock/releases/latest :
komock-app-x.x.x.zip
3. Run
bin\komock-app /path/your_config.yaml
## Examples
**Simple http server**
https://github.com/laviua/komock/wiki/Simple-http-server-(Java)
**Oauth2 server**
https://github.com/laviua/komock/wiki/Oauth2-server
**Consul service registration**
https://github.com/laviua/komock/wiki/Consul
**Spring config server**
https://github.com/laviua/komock/wiki/Spring-config-server
**Unit testing**
https://github.com/laviua/komock/wiki/Unit-Testing-with-request-capturing-(Java)
**Full config**
Callbacks, Mask patterns, cookies, virtualhosts, etc
Look at self-describable configuration file [Link](https://github.com/laviua/komock/blob/master/komock-core/mock_example.yml):
## HTTPS / SSL:
You can use your personal keystore. Just create it by the following command and set filename with password in the configuration file (secure section):
keytool -genkey -alias replserver -keyalg RSA -keystore mock_keystore.jks -dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US" -storepass mockpassword -keypass mockpassword
ssl:
enabled: true
keyStoreLocation: mock_keystore.jks
keyStorePassword: mockpassword
### License ###
Licensed under Apache 2 License