kubebb / core

A declarative component lifecycle management platform
https://kubebb.github.io/website
Apache License 2.0
8 stars 9 forks source link

chore: add test cases for pkg/utils/path.go #245

Closed Henry-Gao-2004 closed 1 year ago

Henry-Gao-2004 commented 1 year ago

What type of PR is this?

What this PR does / why we need it

Which issue(s) this PR fixes

For #194

Special notes for your reviewer

codecov[bot] commented 1 year ago

Codecov Report

Merging #245 (d0c1976) into main (3f0156c) will increase coverage by 0.48%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   17.77%   18.25%   +0.48%     
==========================================
  Files          33       33              
  Lines        3100     3100              
==========================================
+ Hits          551      566      +15     
+ Misses       2518     2501      -17     
- Partials       31       33       +2     

see 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

bjwswang commented 1 year ago

@Henry-Gao-2004 Thanks! From codecov report, you missed some test corners.

image

Henry-Gao-2004 commented 1 year ago

@Henry-Gao-2004 Thanks! From codecov report, you missed some test corners.

Yes! The two missing test corners are where errors are returned. The first error should happen when we create a file after successfully creating the corresponding directory. The second error should happen when we write data into the file we created. Can I know if there a way to reach these two corners?