Skip to content

Commit d118e2d

Browse files
committed
feat: #29 Adding documentation on --filteredOperations new flag
Signed-off-by: Laurent Broudoux <[email protected]>
1 parent 75e440c commit d118e2d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ It allows to launch tests or import API artifacts with minimal dependencies.
1111

1212
## Build Status
1313

14-
Current development version is `0.5.3-SNAPSHOT`. [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/microcks/microcks-cli/build-verify.yml?logo=github&style=for-the-badge)](https://github.com/microcks/microcks-cli/actions)
14+
Current development version is `0.5.3`. [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/microcks/microcks-cli/build-verify.yml?logo=github&style=for-the-badge)](https://github.com/microcks/microcks-cli/actions).
15+
16+
It is available as a container image named `quay.io/microcks/microcks-cli:nightly`.
1517

1618
## Usage instructions
1719

@@ -47,9 +49,11 @@ The flags:
4749
* `--keycloakClientId` for the Keycloak Realm Service Account ClientId,
4850
* `--keycloakClientSecret` for the Keycloak Realm Service Account ClientSecret.
4951

52+
> Since `0.5.2` release, `microcks-cli` also works in unauthenticated mode, without Keycloak being deployed and configured with your Microcks instance. However, you still have to specify the Keycloak flags on the command even if you put random values there. For eg. `--keycloakClientId=foo --keycloakClientSecret=bar`.
53+
5054
Real life example command and execution:
5155

52-
```
56+
```sh
5357
$ ./microcks-cli test 'Beer Catalog API:0.9' http://localhost:9090/api/ POSTMAN \
5458
--microcksURL=http://localhost:8080/api/ \
5559
--keycloakClientId=microcks-serviceaccount \
@@ -59,6 +63,7 @@ $ ./microcks-cli test 'Beer Catalog API:0.9' http://localhost:9090/api/ POSTMAN
5963
MicrocksClient got status for test "5c1781cf6310d94f8169384e" - success: false, inProgress: true
6064
MicrocksTester waiting for 2 seconds before checking again.
6165
MicrocksClient got status for test "5c1781cf6310d94f8169384e" - success: true, inProgress: false
66+
Full TestResult details are available here: http://localhost:8080/#/tests/5c1781cf6310d94f8169384e
6267
```
6368

6469
#### Advanced options
@@ -68,19 +73,21 @@ The `test` command provides additional flags for advanced usages and options:
6873
* `--verbose` allows to dump on standard output all the HTTP requests and responses,
6974
* `--insecure` allows to interact with Microcks and Keycloak instances through HTTPS without checking certificates issuer CA,
7075
* `--caCerts=<path1,path2>` allows to specify additional certificates CRT files to add to trusted roots ones,
71-
* `--secretName='<Secret Name>'` is an optional flag specifying the name of a Secret to use for connecting endpoint
76+
* `--secretName='<Secret Name>'` is an optional flag specifying the name of a Secret to use for connecting endpoint,
77+
* `--filteredOperations=<JSON>` allows to filter a list of operations to launch a test for,
7278
* `--operationsHeaders=<JSON>` allows to override some operations headers for the tests to launch.
7379

7480
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.
7581

7682
Here's below an example of using some of this flags:
7783

7884
```sh
79-
$ ./microcks-cli test 'Beer Catalog API:0.9' http://localhost:9090/api/ POSTMAN \
85+
$ ./microcks-cli test 'Beer Catalog API:0.9' http://localhost:9090/api/ OPEN_API_SCHEMA \
8086
--microcksURL=http://localhost:8080/api/ \
8187
--keycloakClientId=microcks-serviceaccount \
8288
--keycloakClientSecret=7deb71e8-8c80-4376-95ad-00a399ee3ca1 \
8389
--insecure --verbose --waitFor=3sec \
90+
--filterOperations='["GET /beer", "GET /beer/{name}"]' \
8491
--operationsHeaders='{"globals": [{"name": "x-api-key", "values": "my-values"}], "GET /beer": [{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}]}'
8592

8693
MicrocksClient got status for test "64c25f7ddec62569f9a0ed95" - success: true, inProgress: false
@@ -107,6 +114,8 @@ The flags:
107114
* `--keycloakClientId` for the Keycloak Realm Service Account ClientId,
108115
* `--keycloakClientSecret` for the Keycloak Realm Service Account ClientSecret.
109116

117+
> Since `0.5.2` release, `microcks-cli` also works in unauthenticated mode, without Keycloak being deployed and configured with your Microcks instance. However, you still have to specify the Keycloak flags on the command even if you put random values there. For eg. `--keycloakClientId=foo --keycloakClientSecret=bar`.
118+
110119
Real life example command and execution:
111120

112121
```sh

0 commit comments

Comments
 (0)