swupd-client icon indicating copy to clipboard operation
swupd-client copied to clipboard

Testlib: move non public functions to a different file, same for test fixtures

Open castulo opened this issue 4 years ago • 1 comments

Testlib at the moment is divided in 2 main groups:

  1. it provides test fixtures, stuff like assertions, functions to format tests, etc. All this functionality in general is independent of swupd.
  2. It also provides functions to create test resources related to swupd. These can be split in two categories: external functions (these are functions that are intended to be called directly from tests or from the terminal), and internal functions (functions that are only supposed to be used by external functions and not directly from a test or terminal).

The testlib file is getting too big now, I think it may be time to reorganize it in a way that makes more sense. Maybe into 3 different files: one for fixtures, one for internal functions and one for public functions.

castulo avatar Apr 20 '20 20:04 castulo

I also would create one different file that is not included by testlib that includes all functions that are not intended to be used by any test, like list_tests, generate_tests, etc

otaviobp avatar Apr 20 '20 21:04 otaviobp