canonical / oathkeeper-operator

Charmed Ory Oathkeeper
https://charmhub.io/oathkeeper
Apache License 2.0
1 stars 4 forks source link

chore: update expected Pebble plan when using ops 2.10+ #57

Closed tonyandrewmeyer closed 6 months ago

tonyandrewmeyer commented 6 months ago

Issue

From ops 2.10, Harness includes the checks in the returned Pebble plan (as is the case in production when actually using Pebble). This means that the unit tests fail against ops 2.10+.

Solution

Adjust the expected plan in the unit test to match the one that is returned both (now) in production and in testing.

Additional context

I've also bumped the pinned version to be 2.10+ onwards - otherwise the tests should technically handle both cases since the dependency constraint could be satisfied by an older version. Since 2.10 was accepted previously, I'm assuming that this is otherwise ok. There are also some versions after 2.0 (the previous pinned version) where the tests don't pass for other reasons, so I think that it wasn't actually compatible going back that far any more.

Testing Instructions

Run tests against ops 2.9 and 2.10.

Release Notes

Fixes tests to run under ops 2.10+.

natalian98 commented 6 months ago

Hi @tonyandrewmeyer, thanks a lot for opening the PR and providing the context around it.

I will close this PR as the change was already addressed in https://github.com/canonical/oathkeeper-operator/pull/56 (see tests).