Skip to content

Commit

Permalink
docs: add readme for HTTPbin
Browse files Browse the repository at this point in the history
  • Loading branch information
haricnugraha committed Apr 17, 2024
1 parent c0f90b4 commit c2c9aa8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,38 @@ See this [docs](https://turbo.build/repo/docs/handbook/workspaces#workspaces-whi

### How to Test Probe Locally

If you need to test a probe locally, there are predefined services in /dev/docker-compose.yaml. You are **encouraged** to add other services that can be probed by Monika. Run `cd dev && docker compose up` to run those services.
If you need to test a probe locally, there are predefined services in `/dev/docker-compose.yaml`. You are **encouraged** to add other services that can be probed by Monika. Run `cd dev && docker compose up` to run those services.

#### Available Services

Use the following Monika config to probe the service.

##### HTTPBin

```yaml
probes:
- id: 'should not follow redirect'
requests:
- url: http://localhost:3000/status/302
followRedirects: 0
alerts:
- assertion: response.status != 302
message: You should not follow redirect
- id: 'should follow redirect with default config'
requests:
- url: http://localhost:3000/absolute-redirect/20
alerts:
- assertion: response.status == 302
message: You are not follow redirect
- id: 'should follow redirect with customize config'
requests:
- url: http://localhost:3000/status/302
followRedirects: 2
alerts:
- assertion: response.status == 302
message: You are not follow redirect
```
##### MariaDB
```yaml
Expand Down
4 changes: 4 additions & 0 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
services:
httpbin:
image: kennethreitz/httpbin
ports:
- 3000:80
mariadb:
image: mariadb:11
container_name: monika_mariadb
Expand Down
5 changes: 0 additions & 5 deletions dev/httpbin/docker-compose.yaml

This file was deleted.

0 comments on commit c2c9aa8

Please sign in to comment.