Bug 995052 - [RFE] Add rlAssertEmpty and rlAssertNotEmpty functions
[RFE] Add rlAssertEmpty and rlAssertNotEmpty functions
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Muller
Fedora Extras Quality Assurance
: FutureFeature, Patch
Depends On:
  Show dependency treegraph
Reported: 2013-08-08 09:13 EDT by Filip Holec
Modified: 2016-09-19 22:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-02 10:47:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch adding rlAssertEmpty and rlAssertNotEmpty functions (2.05 KB, patch)
2013-08-08 09:13 EDT, Filip Holec
no flags Details | Diff

  None (edit)
Description Filip Holec 2013-08-08 09:13:42 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
write them.

Version-Release number of selected component (if applicable):
Comment 1 Petr Muller 2013-08-12 08:35:09 EDT
This does not need to be private
Comment 2 Petr Muller 2013-08-20 07:28:58 EDT
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.
Comment 3 Petr Muller 2013-12-02 10:47:58 EST
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.

Note You need to log in before you can comment on or make changes to this bug.