Skip to content

Commit 9a6c920

Browse files
committed
Updating documentation
1 parent ccb1a51 commit 9a6c920

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It allows to launch tests with minimal dependencies.
88

99
Current development version is `0.2.0-SNAPSHOT`. [![Build Status](https://travis-ci.org/microcks/microcks-cli.png?branch=master)](https://travis-ci.org/microcks/microcks-cli)
1010

11-
## Usage instrcutions
11+
## Usage instructions
1212

1313
Usage is simply `microcks-cli [command]`
1414

@@ -46,4 +46,41 @@ $ ./microcks-cli test 'Beer Catalog API:0.9' http://localhost:9090/api/ POSTMAN
4646
MicrocksClient got status for test "5c1781cf6310d94f8169384e" - success: false, inProgress: true
4747
MicrocksTester waiting for 2 seconds before checking again.
4848
MicrocksClient got status for test "5c1781cf6310d94f8169384e" - success: true, inProgress: false
49+
```
50+
51+
### Advanced options
52+
53+
The `test` command provides additional flags for advanced usages and options:
54+
* `--verbose` allows to dump on standard output all the HTTP requests and responses,
55+
* `--insecure` allows to interact with Microcks and Keycloak instances through HTTPS without checking certificates issuer CA,
56+
* `--caCerts=<path1,path2>` allows to specify additional certificates CRT files to add to trusted roots ones,
57+
* `--operationsHeaders=<JSON>` allows to override some operations headers for the tests to launch.
58+
59+
Overriden test operations headers is a JSON strings where 1st level keys are operation name (eg. `GET /beer`) or `globals` for header applying to all the operations of the API. Headers are specified as an array of objects defining `key` and `values` properties.
60+
61+
Here's below an example of using some of this flags:
62+
63+
```
64+
./microcks-cli test 'Beer Catalog API:0.9' http://localhost:9090/api/ POSTMAN \
65+
--microcksURL=http://localhost:8080/api/ \
66+
--keycloakClientId=microcks-serviceaccount \
67+
--keycloakClientSecret=7deb71e8-8c80-4376-95ad-00a399ee3ca1 \
68+
--insecure --verbose --waitFor=3sec \
69+
--operationsHeaders='{"globals": [{"name": "x-api-key", "values": "my-values"}], "GET /beer": [{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}]}'
70+
```
71+
72+
## Installation
73+
74+
### Binary
75+
76+
Binary releases for Linux, MacOS or Windows platform are available on the GitHub [releases page](https://github.com/microcks/microcks-cli/releases). Just download the binary corresponding to your system and put the binar into the `PATH` somewhere ;-)
77+
78+
### Container image
79+
80+
The `microcks-cli` is now available as a container image as version `0.2.0`. So that you'd be able to easily use it from a GitLab CI or a [Tekton pipeline](https://github.com/tektoncd/pipeline). The hosting repository is now on Docker Hub [here](https://cloud.docker.com/u/microcks/repository/docker/microcks/microcks-cli).
81+
82+
Below a sample on how using the image without getting the CLI binary:
83+
84+
```
85+
$ docker run -it microcks/microcks-cli:latest microcks-cli test 'Beer Catalog API:0.9' http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/ POSTMAN --microcksURL=http://microcks.apps.144.76.24.92.nip.io/api/ --keycloakClientId=microcks-serviceaccount --keycloakClientSecret=7deb71e8-8c80-4376-95ad-00a399ee3ca1 --waitFor=8sec --operationsHeaders='{"globals": [{"name": "x-api-key", "values": "my-values"}], "GET /beer": [{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}]}'
4986
```

0 commit comments

Comments
 (0)