You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After merging some renovate updates that passed the (extremely minimal) testing that was in place, the app has some issues when importing DNS entries from MTK API. As such, better testing is definitely required.
Goals and non-goals
I only plan to test the code that is directly interacting with the Mikrotik API
For unit tests, I will mock the mikrotik api with some dummy data
I do NOT plan to test anything under pkg/webhook as it is simply copy pasted from other providers and I have absolutely 0 clue as to what that code does 😅
There are some tests in place for internal/configuration and internal/logging. I do NOT plan to expand those
I have no clue as to what I should test under internal/dnsprovider
TODO
Unit tests for internal/mikrotik/record.go
Unit tests for internal/mikrotik/client.go where Mikrotik API is mocked
Should I validate the connection between the API Client and the actual RouterOS API server as part of the Client creation, Provider creation or neither?
I think it is important to validate the client can connect properly (good credentials, good url etc.) sooner rather than later so that we can fail fast if something is wrong.
after implementing #91 and #94 as well as adding relevant tests for #98#97 and #95 , I am much more confident in this code. I will close this for now, as I feel like at least the intention of the original issue has been addressed. Obviously, there is still room for improvement but that will (probably?) come later on.
After merging some renovate updates that passed the (extremely minimal) testing that was in place, the app has some issues when importing DNS entries from MTK API. As such, better testing is definitely required.
Goals and non-goals
pkg/webhook
as it is simply copy pasted from other providers and I have absolutely 0 clue as to what that code does 😅internal/configuration
andinternal/logging
. I do NOT plan to expand thoseinternal/dnsprovider
TODO
internal/mikrotik/record.go
internal/mikrotik/client.go
where Mikrotik API is mockedinternal/mikrotik/client.go
using https://github.com/EvilFreelancer/docker-routeros ?The text was updated successfully, but these errors were encountered: