check_synology icon indicating copy to clipboard operation
check_synology copied to clipboard

Add software tests and CI configuration

Open amotl opened this issue 3 years ago • 7 comments

Dear Frederic,

this patch will add some software tests and a CI/GHA configuration. It works well already, see below. I believe it will tremendously help with future maintenance.

With kind regards, Andreas.

image -- https://github.com/cicerops/check_synology/actions/runs/2777733734

amotl avatar Aug 01 '22 20:08 amotl

Hi Frederic,

I think this will be good to go. While the few test cases only bring in a code coverage of about 10%, at least the infrastructure will be in place. I will submit another patch which exercises the code base more thoroughly [^1].

With kind regards, Andreas.

[^1]: May take some time, have to get my machine fixed beforehand and vacation is near.

amotl avatar Aug 03 '22 01:08 amotl

Hi Frederic,

it may take a few more days to get my machine fixed, so I think all other work on this topic can be submitted with subsequent patches. I think it is good for a patch, mainly focused on enabling CI, anyway. In other words: Feel free to merge, in order to get the test infrastructure in place.

With kind regards, Andreas.

amotl avatar Aug 07 '22 01:08 amotl

Hi Frederic,

my machine got fixed quickly, so I will be able to continue to work a bit on the test harness. Do you have any objections against merging this PR as a baseline beforehand? I will submit subsequent work as separate PRs.

With kind regards, Andreas.

amotl avatar Aug 08 '22 20:08 amotl

The followup patch will be https://github.com/cicerops/check_synology/compare/add-ci...more-tests, submitted with #40 as a draft, bumping the code coverage from 10% to 27% by exercising the load mode for real. It will have to be extended to exercise all other modes and cleaned up a bit before submitting it.

amotl avatar Aug 09 '22 10:08 amotl

Thx for that contribution. Sadly i'm super short on time in the last weeks - I promise i did not forget this addition but i would like to go through everything in detail before merging - and this needs time

wernerfred avatar Sep 16 '22 09:09 wernerfred

Dear Frederic,

thank you. I remembered this patch yesterday as well, sweet that we apparently both did at about the same time ;]. Please take your time to review the patch properly.

With kind regards, Andreas.

amotl avatar Sep 16 '22 10:09 amotl

Friendly bump ;]. As a few reports about potential edge cases are arriving on the issue tracker, and because there are a few contributions not merged yet, like #9, #41 and #46 (thanks a stack, @dommi22m and @bigitag!), I think it would be good to have a test harness in place.

amotl avatar Oct 13 '22 14:10 amotl