Commit Graph

8 Commits

Author SHA1 Message Date
Hector Sanjuan
a53861c844 alerts: Fix sharnless tests 2021-01-14 00:17:20 +01:00
Kishan Mohanbhai Sagathiya
a3b8767e87 Added tests for Alerts
- tests for related cluster method, rest api, client method etc
- clean expired alerts everytime a new alerts come in
2019-12-23 12:42:38 +05:30
Kishan Sagathiya
31534a429b Fix #374: health metrics improvements
- Human-sizes for freespace metrics. Display whether if metric is
expires in something like "expires in 3m".
- When not passing metric name `ipfs-cluster-ctl health metrics` hits
the the metrics endpoint which returns a list of available metrics and
displays to user
- Humanize metrics output
- Sort metrics output
2019-10-24 16:37:26 +02:00
Hector Sanjuan
9685c08ee0 sharness: test should check agains cluster peer ID
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-01-14 13:01:18 +01:00
Kishan Sagathiya
6b4b1bcebb Update sharness/t0032-ctl-health.sh
Fix the pid extraction in test.

Co-Authored-By: hsanjuan <hsanjuan@users.noreply.github.com>

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-01-14 13:01:11 +01:00
Hector Sanjuan
2783186d1f sharness: Fix test typo causing an empty grep
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-01-11 16:26:05 +01:00
Kishan Mohanbhai Sagathiya
fc678242fb Added tests for /monitor/metrics/{metrics_type}
Move ctl-health sharness tests to apprpriate file

Since the API is using the RPC mock to request metrics and it always
returns a mocked test metric we might just do c.Metrics("somemetricstype")
and check that there is no error. Here we just want to check that the
client is hitting an API endpoint (and understands the response).

Fixes #587

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-12-21 08:24:40 +05:30
Kishan Sagathiya
6049b216bb Sharness tests for ipfs-cluster-ctl health metrics
Added sharness tests for `ipfs-cluster-ctl health metrics <metricname>`

Fixes #587

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-12-21 08:24:40 +05:30