Skip to content

feat: Add unit tests for plugins#910

Merged
cmendible merged 1 commit into
mainfrom
feature-plugin-tests
Jun 23, 2026
Merged

feat: Add unit tests for plugins#910
cmendible merged 1 commit into
mainfrom
feature-plugin-tests

Conversation

@cmendible

Copy link
Copy Markdown
Member

Description

This pull request adds comprehensive unit tests for the internal plugins system, YAML plugin loading and validation, the carbon emissions scanner, and the region availability scanner. These tests improve coverage for plugin registration, plugin discovery, YAML validation, emissions report formatting, and region SKU logic, ensuring correctness and reliability of core plugin and scanner features.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #909

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Unit tests passing

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.62%. Comparing base (2436646) to head (ef1945d).

Files with missing lines Patch % Lines
internal/scanners/plugins/carbon/emissions.go 92.85% 2 Missing ⚠️
internal/scanners/plugins/sqlesu/sqlesu.go 97.61% 1 Missing ⚠️
internal/scanners/plugins/zone/mapping.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #910      +/-   ##
==========================================
+ Coverage   26.11%   30.62%   +4.51%     
==========================================
  Files          96       96              
  Lines        7429     7395      -34     
==========================================
+ Hits         1940     2265     +325     
+ Misses       5374     5017     -357     
+ Partials      115      113       -2     
Flag Coverage Δ
unittests 30.62% <94.44%> (+4.51%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 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.

@cmendible cmendible merged commit fe3fd81 into main Jun 23, 2026
20 checks passed
@cmendible cmendible deleted the feature-plugin-tests branch June 23, 2026 11:50
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.

Add unit test coverage for scanner plugins (carbon, region, sqlesu, zone)

2 participants