BazaRb::Fake#durable_save rejects an existing zero-byte file, while the real BazaRb#durable_save uploads it. This makes tests with the fake reject a valid client call.
Steps to reproduce
- Create an empty file with
File.write(path, '').
- Call
BazaRb::Fake.new.durable_save(1, path).
Actual result: BazaRb::Fake#checkfile raises The file must be non-empty because it requires File.size(file).positive?.
Expected result: the fake should accept the same file input as the real BazaRb#durable_save, whose validation only checks that the file exists before uploading it.
The mismatch is between lib/baza-rb/fake.rb:checkfile and lib/baza-rb.rb:durable_save. It matters when a durable intentionally represents an empty artifact.
BazaRb::Fake#durable_saverejects an existing zero-byte file, while the realBazaRb#durable_saveuploads it. This makes tests with the fake reject a valid client call.Steps to reproduce
File.write(path, '').BazaRb::Fake.new.durable_save(1, path).Actual result:
BazaRb::Fake#checkfileraisesThe file must be non-emptybecause it requiresFile.size(file).positive?.Expected result: the fake should accept the same file input as the real
BazaRb#durable_save, whose validation only checks that the file exists before uploading it.The mismatch is between
lib/baza-rb/fake.rb:checkfileandlib/baza-rb.rb:durable_save. It matters when a durable intentionally represents an empty artifact.