This abstraction is intended to test the relation between tested charm and grafana-agent-k8s charm.
It provides the following:
deploy_and_assert_grafana_agent - function deploying grafana-agent-k8s and making relations (logging, metrics-endpoint and grafana-dashboard)
assert_alert_rules - function comparing provided alert rules with alert rules defined in relation data bag
assert_metrics_endpoints - function comparing provided metrics endpoints with metrics endpoints defined in relation data bag, these endpoints are validated from grafana-agent-k8s charm
assert_logging - function checking if endpoint key is in unit relation data bag
get_alert_rules - helper function to collect all alert rules from source of tested charm, default path is ./src/prometheus_alert_rule
These changes are tested by provided integration tests, which are using blackbox-exporter-k8s charm since it has all relations needed.
This abstraction is intended to test the relation between tested charm and grafana-agent-k8s charm. It provides the following:
endpoint
key is in unit relation data bag./src/prometheus_alert_rule
These changes are tested by provided integration tests, which are using
blackbox-exporter-k8s
charm since it has all relations needed.fixes: #97, #99