Repository tests #49
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since the repository is taking care of most of the logic, it appears to be the best place to start introducing tests.
Moreover, since it does not depend on the Android implementation, these can be unit tests.
I'll start working on this since it doesn't appear to me that there are any more important tasks to do that stop the F-Droid publication.
This will likely take me some time; I'll open a draft PR when I can so that if you wish you can also take a look.
I don't know how the CI is setup on here; I hope it'll just pick them up and work.
I had a first look and there are some difficulties: the repository depends on the ConnectivityStatus library which cannot be directly mocked as far as I can see.
Hi,
I use a private droneci instance as ci/cd tool.
It's not public (yet ?) as I use it for other personal projects.
You could try and add a test step in the
.drone.yml
file, and I'll check if it works when it's merged.Can the ConnectivityStatus library be replaced with a mock that returns true or false ?
I have checked, the library can be mocked; I'll thus proceed by mocking all the dependencies of the repository.