Gitea abstraction and altenatives #424
Unanswered
liamfallon
asked this question in
Development
Replies: 3 comments 5 replies
-
@liamfallon What tool are you using for creating mocks? |
Beta Was this translation helpful? Give feedback.
4 replies
-
one thing I always wanted to do is this:
For the git wrappers I have not found anything but we could build something that helps us interact with the various git providers. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I looked a the Mockery framework suggested by @vjayaramrh. I think we should use it where possible for our unit tests. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was looking at writing some unit test for the repository reconciler and was trying to mock the Gitea client. It seems to use the Gitea client directly. See:
https://github.com/nephio-project/nephio/tree/main/controllers/pkg/reconcilers/repository
This makes it pretty awkward to mock, as to mock it we would need to abstract the Gitea client structure into an interface. This then would have overlaps with work to allow other repo systems besides Gitea.
Other people are looking at Gitea and I see the Gitea client has an interface in it. I wonder if anyone had any thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions