valkey icon indicating copy to clipboard operation
valkey copied to clipboard

refactore: Move test to seprate module to can be run separetly

Open aliraad79 opened this issue 9 months ago • 5 comments

Hi, I think this will help with #428 merge request. This is my first merge request on this repo and any comment is helpful for me. Thank you in advance. Fix #428

aliraad79 avatar May 05 '24 08:05 aliraad79

Codecov Report

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

Project coverage is 68.45%. Comparing base (9ebbd5f) to head (bac2529). Report is 6 commits behind head on unstable.

:exclamation: Current head bac2529 differs from pull request most recent head ebe3eb3. Consider uploading reports for the commit ebe3eb3 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #441      +/-   ##
============================================
+ Coverage     68.40%   68.45%   +0.04%     
============================================
  Files           109      109              
  Lines         61673    61673              
============================================
+ Hits          42189    42219      +30     
+ Misses        19484    19454      -30     
Files Coverage Δ
deps/hiredis/sds.h 46.87% <ø> (ø)
src/dict.c 96.93% <ø> (ø)
src/endianconv.c 47.22% <ø> (ø)
src/kvstore.c 96.40% <ø> (ø)
src/listpack.c 90.05% <ø> (ø)
src/quicklist.c 83.94% <ø> (ø)
src/sds.c 86.91% <ø> (ø)
src/sds.h 74.73% <ø> (ø)
src/server.c 88.12% <ø> (ø)
src/sha1.c 98.66% <ø> (ø)
... and 4 more

... and 12 files with indirect coverage changes

codecov[bot] avatar May 05 '24 23:05 codecov[bot]

Thanks for helping, it looks like some of the tests are failing. Did you run:

make valkey-unit-tests
./src/valkey-unit-tests 

To make sure they all run?

madolson avatar May 06 '24 05:05 madolson

No i don't do that. I fix the tests and push it again.

aliraad79 avatar May 07 '24 06:05 aliraad79

Hi. I fix some problems but there is some bigger problems. for test_dict for example we want to use dict_force_resize_ratio variable but it is declared in .c file and not in header. What should i do? can i move this thing to header or there is a trick to include this type of thing only in test? another problem is that some functions and # defines are also in .c file.

aliraad79 avatar May 07 '24 07:05 aliraad79

for test_dict for example we want to use dict_force_resize_ratio variable but it is declared in .c file and not in header. What should i do? can i move this thing to header or there is a trick to include this type of thing only in test? another problem is that some functions and # defines are also in .c file.

For other tests like listpack we've just been including the .c file. Since some other folks have already ported some of the other tests, do you mind just re-submitting the PR just for the dict.c test case? It's a bit easier to merge as well.

madolson avatar May 19 '24 19:05 madolson

Looks like a lot of this work got split up and handled in other PRs, so going to close this.

madolson avatar Oct 01 '24 19:10 madolson