canonical / karapace-operator

Charmed Operator for Aiven Karapace for providing schema registry functionalities on top of Charmed Kafka
Apache License 2.0
0 stars 0 forks source link

[DPE-4253] - Add scenario tests #18

Closed zmraul closed 3 months ago

zmraul commented 4 months ago

Adds scenario based tests.

Note: rolling ops has been removed as it's not really useful for this workload.

zmraul commented 3 months ago
**question** why the rollingops is not required/useful? Could we get all services down if they are all restarting at the same time?

Schemas are stored in Kafka and are used occasionally by a querying client. If we enable REST proxy, where clients will be continuously connected to the API, it might be worth to recheck if rolling restarts are needed. At the moment the lib adds extra events that take time to execute. Imo, better to keep the charm simple and add when needed.

**minor/suggestion** would it be possible to use the `with patch(` pattern [here](https://github.com/canonical/karapace-operator/pull/18/files#diff-0580ab9aef31b44580478eb270ec3422c5e6fef35df585fecb3a68317e246809R105) instead of overriding the `side_effect`, as much as it is done elsewhere in the code? Just for keeping things homogeneous and consistent

I would like to keep that side effect outside, since it's a fairly big piece of code to be copy/pasted on more than one test. Also, I'm thinking on extending that side_effect methods so it mocks more of the exec commands.