redhatcloudx / transformer

Find RHEL images in public clouds
Apache License 2.0
6 stars 3 forks source link

format_google: Add test coverage #676

Closed major closed 1 year ago

major commented 1 year ago

This brings us to 💯 test coverage for format_google.

Turn the parser into a simple dataclass to avoid regular expressions and worrying with amd64/sap bumping into each other. Also split out some of the selflink generation code and avoid re-use of variables.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.61 :tada:

Comparison is base (6e97d52) 88.94% compared to head (6b19a74) 90.55%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #676 +/- ## ========================================== + Coverage 88.94% 90.55% +1.61% ========================================== Files 9 9 Lines 407 413 +6 Branches 84 88 +4 ========================================== + Hits 362 374 +12 + Misses 27 24 -3 + Partials 18 15 -3 ``` | [Impacted Files](https://app.codecov.io/gh/redhatcloudx/transformer/pull/676?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redhatcloudx) | Coverage Δ | | |---|---|---| | [src/cloudimagedirectory/format/format\_google.py](https://app.codecov.io/gh/redhatcloudx/transformer/pull/676?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redhatcloudx#diff-c3JjL2Nsb3VkaW1hZ2VkaXJlY3RvcnkvZm9ybWF0L2Zvcm1hdF9nb29nbGUucHk=) | `100.00% <100.00%> (+20.00%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

major commented 1 year ago

Oh boy, this takes us over 90% coverage! 👏👏👏