rsync-time-backup icon indicating copy to clipboard operation
rsync-time-backup copied to clipboard

First attempt at CI Testing #204

Open reactive-firewall opened this issue 4 years ago • 2 comments

First attempt at laurent22/rsync-time-backup#204

  • [x] tests run every time code is pushed to github (auto-tests)
  • [x] tests show passing example (just a test that usage is output when the -h flag is passed)
  • [x] tests shows failure case with error
  • [x] tests check themselves (both passing and failing example)
  • [x] tests are run in the cloud and thus can be configured to run in multiple environments independent of developer's system (caveat: tests on linux only in this PR)
  • [x] this PR does not break nor alter non-testing code or function
  • [x] maintainer can choose to make tests required for merges

🤔 ... Thoughts? Reviews? Thumbs up?

reactive-firewall avatar Mar 20 '20 01:03 reactive-firewall

This is extremely needed IMO. Not a reason not to try, but some stuff is impossible to simulate unfortunately (e.g. https://github.com/laurent22/rsync-time-backup/issues/64)

Thanks for working on that

fthiery avatar Apr 29 '20 15:04 fthiery

@fthiery

but some stuff is impossible to simulate unfortunately (e.g. #64)

TL;DR I think you're missing an important "easily" between "to" and "simulate. With that assumption it might be worth pointing out that this (#64) kind of use-case would best be tested by mocking the issue. By mocking the failed output of rsync we can skip the long time of waiting on rsync while testing this case. This test would be something like replacing the rsync command with a mocked rsync script that just outputs the lost error behavior without the data, thus separating out the fail case so it may be used to test the handling function.

caveat: however I could be totally wrong and you may mean something else.

reactive-firewall avatar Jan 14 '22 13:01 reactive-firewall