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

feat: helper function in ioutil to PrintObjectAsTree #1129

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

Conversation

Horiodino
Copy link

PR Summary

Fixes Issue: #545

Description of Changes:

  • Added a new helper function, PrintObjectAsTree, in the ioutil package to improve functionality.
  • Refactored the code by removing the redundant tree package from the internal package, as it is no longer needed.

@JeyJeyGao
Copy link
Contributor

@Horiodino Thanks for your contribution! Please fix the license and E2E test and add unit tests to cover the new code.

@FeynmanZhou
Copy link
Member

@Horiodino You can check the CI running results to figure out the failure reasons. In general, you will need to add license header and E2E test to your code changes.

@Horiodino
Copy link
Author

No problem, almost done. I'll let you know once I push it. 👍

@Horiodino
Copy link
Author

I've identified and resolved an issue with the test cases. Initially, there wasn't a problem with the test cases themselves, but I had missed adding the |_ for some, which caused some tests to fail. I've fixed this, and now all test cases should pass.

However, there is one test case that might still be failing: notation/test/e2e/suite/command/sign.go:297. I have cross-checked with the main repository and don't believe this failure is due to my recent commits, but please verify.

@Horiodino
Copy link
Author

all passed expect the one i mentioned above

Summarizing 1 Failure:
  [PANICKED!] notation sign [It] with timestamping and invalid tsa server
  /home/holiodin/notation/test/e2e/internal/utils/matcher.go:91

Ran 90 of 100 Specs in 30.494 seconds
FAIL! -- 89 Passed | 1 Failed | 0 Pending | 10 Skipped


Ginkgo ran 4 suites in 31.385041704s

There were failures detected in the following suites:
  command ./suite/command

Test Suite Failed
Cleaning up...
Zot stopped
notation-e2e
Stopping CRL server...
make: *** [Makefile:62: e2e] Error 1```

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 64.61538% with 46 lines in your changes missing coverage. Please review.

Project coverage is 70.25%. Comparing base (2ff8754) to head (3bbefe6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/ioutil/tree.go 65.51% 34 Missing and 6 partials ⚠️
cmd/notation/inspect.go 57.14% 2 Missing and 1 partial ⚠️
cmd/notation/list.go 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1129      +/-   ##
==========================================
- Coverage   70.79%   70.25%   -0.55%     
==========================================
  Files          48       48              
  Lines        2945     3026      +81     
==========================================
+ Hits         2085     2126      +41     
- Misses        668      701      +33     
- Partials      192      199       +7     

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

@JeyJeyGao
Copy link
Contributor

@Horiodino Sounds good! You have fixed the license and E2E. However, the test coverage doesn't reach 80%. You may need to add unit tests to improve the coverage. Thanks!

@JeyJeyGao
Copy link
Contributor

@Horiodino Could you sign your commit by follow the guide.

@Horiodino
Copy link
Author

@Horiodino Could you sign your commit by follow the guide.

I already signed the commit

go.mod Outdated
@@ -28,6 +28,7 @@ require (
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/net v0.33.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this PR doesn't need to update the go.mod.

@JeyJeyGao
Copy link
Contributor

@Horiodino Could you sign your commit by follow the guide.

I already signed the commit

You may need GPG key signing for the commit. Please have a look at the guide.

Signed-off-by: Horiodino <[email protected]>
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