Red Hat Bugzilla – Bug 995052
[RFE] Add rlAssertEmpty and rlAssertNotEmpty functions
Last modified: 2016-09-19 22:10:16 EDT
Created attachment 784348 [details]
Patch adding rlAssertEmpty and rlAssertNotEmpty functions
Description of problem:
I think it would be great if we had beakerlib functions checking if the file
is empty. So far, I've been testing file emptiness manually.
Recently, in one of the php tests, I noticed a comment that stated:
> # -> needs a rlAssertEmpty!
Since I'm not the only one that would appreciate these functions, I decided to
Version-Release number of selected component (if applicable):
This does not need to be private
We have decided against adding more trivial (rlRun "[ -s $file ]" does the same thing) asserts to BL in the past.
But I think this is not without merit. rlAssertEmpty is more readable than the above. I'll gather some feedback on the general question of adding more trivial assertions to BL, and then decide how to proceed here.
I'm not convinced the costs (added complexity, learning and maintenance) outweight the benefit. I think it is prone to problems with unusual applications (directories...), fixing which would make it even more complicated and multifaceted. Thus, WONTFIX.