Skip to content
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

Improve testability and unit test coverage of moduletemplateinfolookup #2202

Open
1 task
c-pius opened this issue Jan 23, 2025 · 0 comments
Open
1 task

Improve testability and unit test coverage of moduletemplateinfolookup #2202

c-pius opened this issue Jan 23, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@c-pius
Copy link
Contributor

c-pius commented Jan 23, 2025

Description

Improve the testability of the code in moduletemplateinfolookup and cover it with more unit tests. This should at least include:

  • "by_channel_strategy":
    • Test for Lookup when no templates are found
    • Test for Lookup when more than one template is found
    • Test for Lookup when the template has no channel
    • Test for Lookup when the template is marked as mandatory
  • "by_version_strategy":
    • When filterTemplatesByVersion returns an error due to failing to list module templates
    • When filterTemplatesByVersion returns an error due to more than one template candidate
    • When filterTemplatesByVersion returns an error due to no templates found
    • When filterTemplatesByVersion returns an error due to the template being marked as mandatory
  • "module_release_meta_strategy":
    • Test for Lookup when GetChannelVersionForModule returns an error
    • Test for Lookup when getTemplateByVersion returns an error
  • helper functions in "common"

Reasons

Follow-up from: #2200

We refactored the template lookup and already increased test coverage of the copied code. We should further strive to increase the test coverage.

Acceptance Criteria

  • tests mentioned above covered

Feature Testing

No response

Testing approach

No response

Attachments

No response

@c-pius c-pius added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant