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

Appender tests #360

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Appender tests #360

wants to merge 5 commits into from

Conversation

bconn98
Copy link
Collaborator

@bconn98 bconn98 commented Mar 3, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.58%. Comparing base (c981ca4) to head (f1352bd).
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #360      +/-   ##
==========================================
+ Coverage   63.01%   70.58%   +7.57%     
==========================================
  Files          24       24              
  Lines        1560     1557       -3     
==========================================
+ Hits          983     1099     +116     
+ Misses        577      458     -119     

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

.tty_only(true)
.target(Target::Stderr)
.build();
}
Copy link
Owner

Choose a reason for hiding this comment

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

what are we testing here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've had recent experience where just creating the object would have discovered a bug causing segmentation faults. In that case it was the cleanup that occurs afterwards that caused the fault. Here we hit all aspects of the builder to ensure they don't enter an invalid state


// No actions to take here, the writer becomes inaccessible but theres
// no getter to verify
logfile.roll();
Copy link
Owner

Choose a reason for hiding this comment

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

cant we verify the roll has happened?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm yeah, I can create a dummy LogWriter and make sure it gets cleaned up. It's a tough line of UTs without proper Mocks but that's a future addition.

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