rippled icon indicating copy to clipboard operation
rippled copied to clipboard

test: Check for some unlikely null dereferences in tests

Open ximinez opened this issue 1 year ago • 1 comments
trafficstars

High Level Overview of Change

I stumbled upon these couple of places where test code could, but is very unlikely to, dereference a null pointer. I added a simple check to each of them.

Context of Change

This was a random find.

Even though these changes are tiny, I don't think they are insignificant enough to be considered "trivial", so I'm requesting two reviews.

Type of Change

  • [X] Bug fix (non-breaking change which fixes an issue)
  • [X] Tests (you added tests for code that already exists, or your new feature included in this PR)

Before / After

There should be no observable change, as tests aren't currently likely / able to get a null value.

Future Tasks

Maybe there are more of these?

ximinez avatar Apr 26 '24 16:04 ximinez

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.9%. Comparing base (b54d85d) to head (4e38577). Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5004     +/-   ##
=========================================
- Coverage     77.9%   77.9%   -0.0%     
=========================================
  Files          784     784             
  Lines        66681   66682      +1     
  Branches      8140    8137      -3     
=========================================
- Hits         51948   51944      -4     
- Misses       14733   14738      +5     

see 6 files with indirect coverage changes

Impacted file tree graph

codecov-commenter avatar Apr 26 '24 17:04 codecov-commenter

Hold pending 2.3.0 release.

ximinez avatar Nov 18 '24 19:11 ximinez

Manually merged as 8215c605b456d16ce041f5fc579e0dfdaf415576

$ git diff --exit-code 8215c605b456d16ce041f5fc579e0dfdaf415576 ximinez/pr/test_fixes && echo Identical
Identical

ximinez avatar Dec 03 '24 20:12 ximinez