Skip to content

chore(feature): add minor unit tests to Scorecard Dependabot#3045

Open
alizard0 wants to merge 3 commits intomainfrom
RHIDP-13347
Open

chore(feature): add minor unit tests to Scorecard Dependabot#3045
alizard0 wants to merge 3 commits intomainfrom
RHIDP-13347

Conversation

@alizard0
Copy link
Copy Markdown
Member

@alizard0 alizard0 commented May 5, 2026

  • DependabotClient tests: add coverage for missing apiBaseUrl and assert a clear Missing GitHub API base URL for '' error; ensure no Octokit paginate call happens in that case.
  • DependabotMetricProvider.getRepository tests: add cases for malformed github.com/project-slug values with empty owner (/repo) or empty repo (owner/).
  • DependabotMetricProvider.getMetric tests: extend severity-parameterized assertions to verify metric descriptors include history: true (and type: 'number') for each severity.
  • DependabotMetricProvider.calculateMetric tests: add rejection/error-propagation coverage when mocked DependabotClient.getAlerts() fails.
  • DependabotMetricProvider.getCatalogFilter tests: tighten to strict equality vs @backstage/catalog-client CATALOG_FILTER_EXISTS for github.com/project-slug and 'true' for github.com/dependabot.

https://redhat.atlassian.net/browse/RHIDP-13335
https://redhat.atlassian.net/browse/RHIDP-13323
https://redhat.atlassian.net/browse/RHIDP-13325
https://redhat.atlassian.net/browse/RHIDP-13320

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.75%. Comparing base (5e4d2b2) to head (7e2aa6e).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3045      +/-   ##
==========================================
- Coverage   60.78%   60.75%   -0.04%     
==========================================
  Files        2067     2067              
  Lines       63873    63778      -95     
  Branches    16580    16635      +55     
==========================================
- Hits        38827    38747      -80     
+ Misses      24793    24460     -333     
- Partials      253      571     +318     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from f1675af
ai-integrations 70.03% <ø> (ø) Carriedforward from f1675af
app-defaults 69.60% <ø> (ø) Carriedforward from f1675af
augment 69.36% <ø> (ø) Carriedforward from f1675af
bulk-import 72.44% <ø> (ø) Carriedforward from f1675af
cost-management 16.49% <ø> (ø) Carriedforward from f1675af
dcm 32.85% <ø> (ø) Carriedforward from f1675af
extensions 61.42% <ø> (ø) Carriedforward from f1675af
global-floating-action-button 73.75% <ø> (ø) Carriedforward from f1675af
global-header 61.62% <ø> (ø) Carriedforward from f1675af
homepage 50.84% <ø> (-0.08%) ⬇️ Carriedforward from f1675af
konflux 91.01% <ø> (ø) Carriedforward from f1675af
lightspeed 69.68% <ø> (-0.28%) ⬇️ Carriedforward from f1675af
mcp-integrations 81.59% <ø> (ø) Carriedforward from f1675af
orchestrator 33.15% <ø> (ø) Carriedforward from f1675af
quickstart 62.64% <ø> (ø) Carriedforward from f1675af
sandbox 79.56% <ø> (+0.07%) ⬆️ Carriedforward from f1675af
scorecard 83.64% <ø> (+0.03%) ⬆️
theme 64.54% <ø> (ø) Carriedforward from f1675af
translations 8.49% <ø> (ø) Carriedforward from f1675af
x2a 82.09% <ø> (ø) Carriedforward from f1675af

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e4d2b2...7e2aa6e. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alizard0 alizard0 requested a review from a team as a code owner May 6, 2026 08:01
@alizard0 alizard0 requested a review from dzemanov May 6, 2026 08:01
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant