Skip to content

improving unit test coverage (WIP)#3246

Open
uruwhy wants to merge 50 commits into
masterfrom
coverage-a
Open

improving unit test coverage (WIP)#3246
uruwhy wants to merge 50 commits into
masterfrom
coverage-a

Conversation

@uruwhy
Copy link
Copy Markdown
Contributor

@uruwhy uruwhy commented Jan 22, 2026

Description

  • address most unit test warnings
  • add additional unit tests to boost code coverage to
  • minor base code refactoring and adjustments to remove unused code or to allow unit testing on certain components

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Ran tests to confirm coverage

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@sonarqubecloud
Copy link
Copy Markdown

jlklos
jlklos previously approved these changes Feb 4, 2026
Copy link
Copy Markdown
Contributor

@jlklos jlklos left a comment

Choose a reason for hiding this comment

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

Tested the code locally and confirmed Caldera core runs well both with and without plugins enabled. Ran coverage tests locally and confirmed Sonarqube results. Local coverage test reports overall code coverage at 85%.

@uruwhy uruwhy marked this pull request as ready for review May 15, 2026 15:37
}
if url == 'https://api.github.com/gists':
mock_data = MOCK_GISTS
elif url.startswith('https://gist.githubusercontent.com'):
Comment thread app/api/rest_api.py
raise web.HTTPNotFound(text='File not found')
except Exception as e:
return web.HTTPNotFound(body=str(e))
raise web.HTTPNotFound(text=str(e))
Comment thread app/api/rest_api.py
def _request_errors(request):
errors = []
return errors
raise web.HTTPNotFound(text=str(e))
@sonarqubecloud
Copy link
Copy Markdown

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