Skip to content

Appender tests#360

Open
gauntl3t12 wants to merge 5 commits intoestk:mainfrom
gauntl3t12:appender_tests
Open

Appender tests#360
gauntl3t12 wants to merge 5 commits intoestk:mainfrom
gauntl3t12:appender_tests

Conversation

@gauntl3t12
Copy link
Contributor

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
Contributor 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
Contributor 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