Skip to content

Add comprehensive test suite for core modules#276

Merged
Edwardvaneechoud merged 1 commit intomainfrom
claude/improve-code-coverage-ZZbTX
Jan 29, 2026
Merged

Add comprehensive test suite for core modules#276
Edwardvaneechoud merged 1 commit intomainfrom
claude/improve-code-coverage-ZZbTX

Conversation

@Edwardvaneechoud
Copy link
Copy Markdown
Owner

Summary

This PR adds a comprehensive test suite covering 13 core modules across the flowfile_core package. The tests provide coverage for utility functions, data models, managers, and configuration handling.

Key Changes

  • Layout calculation tests (test_calculate_layout.py): Tests for layered graph layout algorithm including empty graphs, linear chains, fan-out/fan-in patterns, and diamond patterns
  • Column utilities tests (test_column_utils.py): Tests for Polars data type mapping and conversion functions
  • Compatibility enhancements tests (test_compatibility_enhancements.py): Tests for dataclass-to-Pydantic migration and flow settings management
  • Configuration utilities tests (test_config_utils.py): Tests for MutableBool dataclass with equality and mutation operations
  • Connection manager tests (test_connection_manager.py): Tests for connection CRUD operations and group management
  • Core utilities tests (test_core_utils.py): Tests for string conversion, type standardization, and dictionary utilities
  • Database connection models tests (test_db_connection_models.py): Tests for DatabaseConnectionOutput model serialization
  • File explorer utilities tests (test_file_explorer_utils.py): Tests for file chunking, media type detection, and extension handling
  • File manager tests (test_file_manager.py): Tests for directory creation and file removal operations
  • Flow data utilities tests (test_flow_data_utils.py): Tests for data type detection and column transformation
  • Flowfile utilities tests (test_flowfile_utils.py): Tests for hashing, JSON serialization, and batch generation
  • Additional test modules: Tests for graph utilities, node models, and schema validation

Notable Implementation Details

  • Uses pytest fixtures for setup/teardown and temporary file handling
  • Includes mock objects for testing graph structures and database connections
  • Tests both happy paths and error conditions
  • Covers edge cases like empty inputs, duplicate values, and type conversions
  • Tests fallback behavior and error handling in compatibility functions

Add 19 new test files covering 311 test cases across flowfile_core and
flowfile_worker. Key coverage improvements include:

Core tests (14 files):
- connection_manager: 0% -> 100%
- pivot_table: 0% -> 100%
- configs/utils (MutableBool): 53% -> 100%
- auth/password: 56% -> 100%
- utils/fileManager: 23% -> 100%
- database_connection_manager/models: 0% -> 100%
- calculate_layout: 4% -> 87%
- sample_data: 48% -> 94%
- fileExplorer/utils: 0% -> 60%
- flow_file_column/utils: 70% -> 92%
- compatibility_enhancements: 30% -> 45%
- flowfile/utils: 45% -> 64%

Worker tests (5 files):
- create/pl_types: 0% -> 100%
- process_manager: 58% -> 100%
- secrets: 39% -> 73%
- create/utils: 18% -> 43%

https://claude.ai/code/session_01DNZsCPXCZnvnnnKPnAQHEZ
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 29, 2026

Deploy Preview for flowfile-wasm canceled.

Name Link
🔨 Latest commit f4856d1
🔍 Latest deploy log https://app.netlify.com/projects/flowfile-wasm/deploys/697bac57d0441f0009487410

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Edwardvaneechoud Edwardvaneechoud merged commit 023b4c5 into main Jan 29, 2026
21 checks passed
@Edwardvaneechoud Edwardvaneechoud deleted the claude/improve-code-coverage-ZZbTX branch February 9, 2026 05:21
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