Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMWK-563 Make check for emptiness only for directory #147

Merged
merged 2 commits into from
Sep 22, 2024

Conversation

filkeith
Copy link
Contributor

  • we check only dir if it is empty

- we check only dir if it is empty
- removed test for one file for empty folder, as we don't check it
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.

Project coverage is 81.17%. Comparing base (89d2cd5) to head (b5cbae1).

Files with missing lines Patch % Lines
io/azure/blob/writer.go 57.14% 1 Missing and 2 partials ⚠️
io/aws/s3/writer.go 66.66% 1 Missing and 1 partial ⚠️
io/gcp/storage/writer.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   81.12%   81.17%   +0.05%     
==========================================
  Files          85       85              
  Lines        4614     4617       +3     
==========================================
+ Hits         3743     3748       +5     
+ Misses        613      609       -4     
- Partials      258      260       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -223,15 +223,6 @@ func (s *writeReadTestSuite) writeSingleFile(filename string, bytes, times int,
s.FailNow("failed to close writer", err)
}

// cannot create new streamingReader because folder is not empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, it's a good test, we can leave it.
just use WithDir

btw, there is misprint in s3Storasge

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or, change assertion to "require no error"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is writeSingleFile test, so can't use WithDir here. Also with no error is is tested above

@filkeith filkeith merged commit a1ad8e8 into main Sep 22, 2024
9 checks passed
@filkeith filkeith deleted the FMWK-563-empty-check-only-dir branch September 22, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants