Skip to content

BazaRb::Fake#durable_save rejects empty files that the real client uploads #495

Description

@gemshrine

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

  1. Create an empty file with File.write(path, '').
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions