Skip to content

LCORE-2168: more unit tests for configuration loading#1721

Merged
tisnik merged 2 commits into
lightspeed-core:mainfrom
tisnik:lcore-2168-more-unit-tests-for-configuration-loading
May 12, 2026
Merged

LCORE-2168: more unit tests for configuration loading#1721
tisnik merged 2 commits into
lightspeed-core:mainfrom
tisnik:lcore-2168-more-unit-tests-for-configuration-loading

Conversation

@tisnik
Copy link
Copy Markdown
Contributor

@tisnik tisnik commented May 12, 2026

Description

LCORE-2168: more unit tests for configuration loading

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-2168

Summary by CodeRabbit

  • Tests
    • Enhanced test coverage for configuration validation with additional edge cases to improve error handling robustness.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8fbb5ab8-8c2b-44d6-aa2a-86f3c04ce19d

📥 Commits

Reviewing files that changed from the base of the PR and between 70cb0db and 6833fde.

📒 Files selected for processing (1)
  • tests/unit/test_configuration.py
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: build-pr
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: Pylinter
  • GitHub Check: spectral
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
🧰 Additional context used
📓 Path-based instructions (1)
tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.py: Use pytest for all unit and integration tests; do not use unittest
Use pytest.mark.asyncio marker for async tests

Files:

  • tests/unit/test_configuration.py
🔇 Additional comments (3)
tests/unit/test_configuration.py (3)

17-17: LGTM!


1880-2303: LGTM!


2310-2310: LGTM!


Walkthrough

The PR expands test coverage for AppConfig.init_from_dict error handling. It imports InvalidConfigurationError, extends the invalid configuration test dataset with additional entries, and updates the test to expect both ValueError and InvalidConfigurationError exceptions when initialization fails.

Changes

Test Coverage Expansion

Layer / File(s) Summary
Error handling test expansion
tests/unit/test_configuration.py
Imports InvalidConfigurationError, extends wrong_configurations test dataset with 425 additional invalid configuration entries, and updates test_init_from_dict_fake_data to expect both ValueError and InvalidConfigurationError when AppConfig.init_from_dict is called with invalid data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding more unit tests for configuration loading, which aligns with the raw summary showing extended test coverage for AppConfig initialization.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tisnik tisnik merged commit 590c3b7 into lightspeed-core:main May 12, 2026
31 of 32 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.

1 participant