diff --git a/README.md b/README.md index 74b9fc9f1..aa8cd2ae2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 829ab3b46..a7c678281 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -1,4 +1,8 @@ services: + httpbin: + image: kennethreitz/httpbin + ports: + - 3000:80 mariadb: image: mariadb:11 container_name: monika_mariadb diff --git a/dev/httpbin/docker-compose.yaml b/dev/httpbin/docker-compose.yaml deleted file mode 100644 index 39b56efb6..000000000 --- a/dev/httpbin/docker-compose.yaml +++ /dev/null @@ -1,5 +0,0 @@ -services: - httpbin: - image: kennethreitz/httpbin - ports: - - 3000:80