Skip to content

Refactor Existing Test Script and Add New Unit Tests for GCE Billing#516

Merged
mambelli merged 6 commits intoHEPCloud:masterfrom
namrathaurs:fix-unit-tests-gcebilling-v2
May 7, 2025
Merged

Refactor Existing Test Script and Add New Unit Tests for GCE Billing#516
mambelli merged 6 commits intoHEPCloud:masterfrom
namrathaurs:fix-unit-tests-gcebilling-v2

Conversation

@namrathaurs
Copy link
Contributor

@namrathaurs namrathaurs commented Apr 7, 2025

This PR addresses the modifications to the existing test script for GCE Billing in Decision Engine modules. As the cloud billing analysis code was migrated to BigQuery in the recent past, a part of existing test script became obsolete since the previous class methods in GCEBillCalculator no longer exist/have changed. To reflect the new version of the billing code, new unit tests are introduced through this pull request.

@namrathaurs namrathaurs self-assigned this Apr 7, 2025
@codecov
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.92%. Comparing base (4f590a6) to head (4f2e20c).
Report is 20 commits behind head on master.

Files with missing lines Patch % Lines
...cisionengine_modules/GCE/sources/GCEBillingInfo.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #516      +/-   ##
==========================================
+ Coverage   47.84%   47.92%   +0.07%     
==========================================
  Files          54       54              
  Lines        2951     2940      -11     
  Branches      510      441      -69     
==========================================
- Hits         1412     1409       -3     
+ Misses       1439     1438       -1     
+ Partials      100       93       -7     
Flag Coverage Δ
python-3.8 ?
python-3.9 47.92% <0.00%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

- addressed CI errors for ruff and flake8
- includes a second test using an fake credential that has an invalid
  key
- updated tests to reflect correct PEP8-compliant method names
- updated the PEP8-compliant method name in GCEBillingInfo module
@namrathaurs namrathaurs force-pushed the fix-unit-tests-gcebilling-v2 branch from 4f2e20c to b2fef1f Compare April 9, 2025 20:13
@namrathaurs namrathaurs changed the title Refactor Existing Test Script and Add New Unit Tests for GCE Billing module Refactor Existing Test Script and Add New Unit Tests for GCE Billing Apr 16, 2025
@namrathaurs namrathaurs marked this pull request as ready for review April 16, 2025 14:48
@mambelli mambelli self-requested a review April 23, 2025 15:08
@mambelli mambelli merged commit 46bfc52 into HEPCloud:master May 7, 2025
12 of 13 checks passed
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.

2 participants