Closed hihilla closed 3 years ago
@nodo
How are would it be to add unit tests?
I am not 100% sure how to test this without a fake client, and even with, I'm not sure how to test this...
Adding a fake client is exactly the wait to go, maybe you could try and use https://pkg.go.dev/k8s.io/client-go/kubernetes/fake for a fake k8s client. I am not 100% sure on how to do it but I think it would be worth, let me know if I can help out somehow.
Prepare - saves applications and releases objects to file in a tree (map) form: for each application we store the releases belonging to it.
Restore - restores from a backup file. First restore the application, populate the new UID of the application in its releases owner reference and then apply releases.
output example: