2 Commits

Author SHA1 Message Date
Niels de Vos
457ffe884a cleanup: address golangci 'usetesting' linter issues
When a context.Context is needed in a unit test, t.Context() should be
used instead of creating a new one with context.TODO() or
context.Background().

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2025-05-06 11:26:06 +00:00
Niels de Vos
04257464bb rbd: cleanup mirror last-sync-info parsing
By introducing a SyncInfo interface, the `getLastSyncInfo` function can
be removed from the csi-addons/rbd package. Getting details from an RBD
mirror status, should be part of the main internal/rbd package, the
CSI-Addons components should only use the internal API, and not add any
parsing logic.

This makes it easier to enhance the SyncInfo interface in the future.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2025-05-05 17:28:58 +00:00