GnuCash-Pocket / gnucash-android

GnuCash Pocket – a mobile companion app for Gnucash desktop application (https://github.com/Gnucash/gnucash). Developed independently of GnuCash.
Apache License 2.0
87 stars 17 forks source link

Properly fix or delete OwnCloudExportTest #170

Open djbrown opened 4 months ago

djbrown commented 4 months ago

The ownCloud demo server was shut down.

OwnCloudExportTest has only one test case. It references the former demo server: https://github.com/GnuCash-Pocket/gnucash-android/blob/39ebc898617e68264c688799d69b17c358f586df/app/src/androidTest/java/org/gnucash/android/test/ui/OwnCloudExportTest.java#L83

In #155 the test was modified to abort before connecting to the demo server.

The goal of this issue is to handle the test properly.

Possible solutions:

  1. delete the test (file)
  2. refactor for testability (dependency inversion) and pass implementation with static test behavior
  3. mock (override) existing production methods (using e.g. mockito)
  4. provide a mock server with static test behavior (using e.g. wiremock)
  5. setup a real ephemeral ownCloud instance within GitHub workflow and locally (using e.g. docker)
  6. setup a real persistant ownCloud instance with separate infrastructure (using e.g. google cloud platform)