Skip to content

Conversation

@intojhanurag
Copy link
Contributor

@intojhanurag intojhanurag commented Oct 31, 2025

This PR adds a unit test for the DeleteManifest function in the Tencent Container Registry (TCR) adapter.

Changes:

  • Introduced a mockAdapter to simulate the delete behavior without calling real Tencent Cloud APIs.
  • Added two test cases:
    1. Invalid repository format — ensures the function returns an error when the repository name doesn’t follow the <namespace>/<repo> pattern.
    2. Valid repository format — validates correct parsing of namespace and repository, and successful invocation of the mock delete method.
Screenshot 2025-10-31 193101

Signed-off-by: Anurag Ojha <aojharaj2004@gmail.com>
@intojhanurag intojhanurag force-pushed the feat/tencentcr-delete-manifest-test branch from 33ee4a3 to 0754346 Compare October 31, 2025 14:07
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.85%. Comparing base (c8c11b4) to head (0754346).
⚠️ Report is 591 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22537       +/-   ##
===========================================
+ Coverage   45.36%   65.85%   +20.48%     
===========================================
  Files         244     1073      +829     
  Lines       13333   116079   +102746     
  Branches     2719     2931      +212     
===========================================
+ Hits         6049    76445    +70396     
- Misses       6983    35399    +28416     
- Partials      301     4235     +3934     
Flag Coverage Δ
unittests 65.85% <ø> (+20.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 987 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@intojhanurag
Copy link
Contributor Author

intojhanurag commented Oct 31, 2025

Hey @chlins @MinerYang, I added a test . Can you take a look if you have a moment that my approach is good to go ??

@chlins chlins added the release-note/ignore-for-release Do not include PR or Issue for release notes label Nov 3, 2025
Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@chlins chlins enabled auto-merge (squash) November 3, 2025 02:31
@intojhanurag
Copy link
Contributor Author

Hey @Vad1mo , @wy65701436 , Can you take a look on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore-for-release Do not include PR or Issue for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants