canonical / prometheus-k8s-operator

https://charmhub.io/prometheus-k8s
Apache License 2.0
21 stars 35 forks source link

Fix brittle test #380

Closed sed-i closed 2 years ago

sed-i commented 2 years ago

Issue

A brittle test broke between merge CI and release CI of #379.

https://github.com/canonical/prometheus-k8s-operator/blob/72dc79c800a5408eb207ef43a7972502e22d4818/tests/integration/test_check_config.py#L63-L69

The key name for the action's return code changed (not sure where/how):

     {
-    'Code': '0',
     'error-message': '',
     'result': 'Checking /etc/prometheus/prometheus.yml\n'
               ' SUCCESS: /etc/prometheus/prometheus.yml is valid prometheus '
               'config file syntax\n'
               '\n',
+    'return-code': 0,
     'valid': 'True',
    }

Solution

Context

NTA.

Testing Instructions

Release Notes

Fix itest.