canonical / oidc-gatekeeper-operator

Charmed OIDC Gatekeeper
Apache License 2.0
0 stars 7 forks source link

integration tests are not detecting failures in the workload, leading to false :heavy_check_mark: in CI #130

Open ca-scribner opened 5 months ago

ca-scribner commented 5 months ago

Bug Description

As described in #126, this charm's CI has been showing as working (eg: :heavy_check_mark: ) even though the workload is not deploying properly. This led to us at some point in the past breaking the charm without noticing, and then catching it when it blocked a few unrelated efforts.

We should fix this CI, as well as any root causes for why it doesn't work (likely we need to address #82 as well, because sometimes the workload is up but not healthy).

To Reproduce

See #126.

Environment

-

Relevant Log Output

-

Additional Context

No response

syncronize-issues-to-jira[bot] commented 5 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5229.

This message was autogenerated

orfeas-k commented 4 months ago

In order to test the health check described in https://github.com/canonical/oidc-gatekeeper-operator/issues/82#issuecomment-1945910032, implement the following logic:

  1. misconfigure the workload in order for the service to not replying successfully and the workload health check to be failing
  2. Then either: i. Wait 40 seconds which are the seconds that the health needs to be set to down (threshold * (period + timeout)). Then, fire an update-status in order to verify that the charm's status will reflect the workload's status ii. Configure model to fire update-status every 10 seconds using fast-forward and assert that the charm status is maintenace with a proper timeout. This can be done either like this or this.