clearlinux / swupd-client

Software update client
Other
116 stars 61 forks source link

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

Open castulo opened 4 years ago

castulo commented 4 years ago

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.

otaviobp commented 4 years ago

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