Skip to content

chore: add some utils tests #3514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 5, 2025
Merged

chore: add some utils tests #3514

merged 13 commits into from
May 5, 2025

Conversation

egor-romanov
Copy link
Contributor

What kind of change does this PR introduce?

  • just add some utils tests

@sweatybridge sweatybridge marked this pull request as ready for review May 5, 2025 04:24
@sweatybridge sweatybridge requested a review from a team as a code owner May 5, 2025 04:24
sweatybridge
sweatybridge previously approved these changes May 5, 2025
@sweatybridge sweatybridge self-requested a review May 5, 2025 04:57
@sweatybridge sweatybridge dismissed their stale review May 5, 2025 04:58

Something is not right with coverage reporting

Copy link
Contributor

Choose a reason for hiding this comment

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

This is mostly covered by internal/utils/api_test.go but was reported as 0% due to a bug in coverage reporting introduced by go 1.24 upgrade. I've fixed the coverage reporting issue so could you rebase and verify if these tests are improving coverage?

Historically a large part of this file was moved from internal/utils/api.go and it wasn't worth the effort to rewrite or refractor the tests that already covered the code paths.

Copy link
Contributor

Choose a reason for hiding this comment

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

This test randomly fails due to a race condition in the underlying implementation. The code path is only affecting pgadmin schema diff tool which we plan to deprecate.

I'd suggest removing this test since there's no need to further maintain this code.

@coveralls
Copy link

coveralls commented May 5, 2025

Pull Request Test Coverage Report for Build 14834415000

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.2%) to 59.789%

Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 14830218243: 1.2%
Covered Lines: 8994
Relevant Lines: 15043

💛 - Coveralls

@sweatybridge sweatybridge merged commit 679f873 into develop May 5, 2025
19 checks passed
@sweatybridge sweatybridge deleted the chore/tests branch May 5, 2025 11:19
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.

3 participants