-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Testing] Refactor mock server to support distributed configuration loading #37695
Merged
andy31415
merged 2 commits into
project-chip:master
from
swan-amazon:v1.5/chip-tool/test-dcl-server
Feb 21, 2025
Merged
[Testing] Refactor mock server to support distributed configuration loading #37695
andy31415
merged 2 commits into
project-chip:master
from
swan-amazon:v1.5/chip-tool/test-dcl-server
Feb 21, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ce886c3
to
609c1ba
Compare
3fbcc02
to
aaeb333
Compare
PR #37695: Size comparison from 1543d47 to aaeb333 Full report (3 builds for cc32xx, stm32)
|
cjandhyala
approved these changes
Feb 20, 2025
Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation. Key Changes: - Restructured configuration loading to support directory-based routing configs - Added dataclass-based type safety for configuration and route definitions - Updated path handling to use pathlib.Path for better cross-platform support - Modified server launch configuration to support routing config directory - Added configurations for mocking multiple services: * Distributed Compliance Ledger (DCL) * Product Terms & Conditions server Technical Improvements: - Introduced strongly typed Route and Configuration classes - Simplified route matching logic with dedicated matcher - Improved error handling for configuration loading - Updated unit tests to support new configuration structure The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references. Test Configuration: - Added example configurations for VID:65521/65522, PID:32769 - Updated TC URL endpoints to use port 44538 - Included sample Terms & Conditions responses
aaeb333
to
c38172c
Compare
Add input validation to verify that SSL certificate and key files exist and are regular files before attempting to create the SSL context. This provides clearer error messages to users when certificate files are missing or invalid, following the same validation pattern used for config files.
PR #37695: Size comparison from 26a7b1c to 3379872 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Merging at the request of CSG: this does not change main application/SDK functionality. |
swan-amazon
added a commit
to swan-amazon/connectedhomeip
that referenced
this pull request
Feb 21, 2025
…oading (project-chip#37695) * Refactor mock server to support distributed configuration loading Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation. Key Changes: - Restructured configuration loading to support directory-based routing configs - Added dataclass-based type safety for configuration and route definitions - Updated path handling to use pathlib.Path for better cross-platform support - Modified server launch configuration to support routing config directory - Added configurations for mocking multiple services: * Distributed Compliance Ledger (DCL) * Product Terms & Conditions server Technical Improvements: - Introduced strongly typed Route and Configuration classes - Simplified route matching logic with dedicated matcher - Improved error handling for configuration loading - Updated unit tests to support new configuration structure The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references. Test Configuration: - Added example configurations for VID:65521/65522, PID:32769 - Updated TC URL endpoints to use port 44538 - Included sample Terms & Conditions responses * server: Add validation checks for SSL certificate and key files Add input validation to verify that SSL certificate and key files exist and are regular files before attempting to create the SSL context. This provides clearer error messages to users when certificate files are missing or invalid, following the same validation pattern used for config files.
andy31415
pushed a commit
that referenced
this pull request
Feb 21, 2025
…oading (#37695) (#37713) * Refactor mock server to support distributed configuration loading Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation. Key Changes: - Restructured configuration loading to support directory-based routing configs - Added dataclass-based type safety for configuration and route definitions - Updated path handling to use pathlib.Path for better cross-platform support - Modified server launch configuration to support routing config directory - Added configurations for mocking multiple services: * Distributed Compliance Ledger (DCL) * Product Terms & Conditions server Technical Improvements: - Introduced strongly typed Route and Configuration classes - Simplified route matching logic with dedicated matcher - Improved error handling for configuration loading - Updated unit tests to support new configuration structure The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references. Test Configuration: - Added example configurations for VID:65521/65522, PID:32769 - Updated TC URL endpoints to use port 44538 - Included sample Terms & Conditions responses * server: Add validation checks for SSL certificate and key files Add input validation to verify that SSL certificate and key files exist and are regular files before attempting to create the SSL context. This provides clearer error messages to users when certificate files are missing or invalid, following the same validation pattern used for config files.
popovdg
pushed a commit
to popovdg/connectedhomeip
that referenced
this pull request
Feb 25, 2025
…oading (project-chip#37695) * Refactor mock server to support distributed configuration loading Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation. Key Changes: - Restructured configuration loading to support directory-based routing configs - Added dataclass-based type safety for configuration and route definitions - Updated path handling to use pathlib.Path for better cross-platform support - Modified server launch configuration to support routing config directory - Added configurations for mocking multiple services: * Distributed Compliance Ledger (DCL) * Product Terms & Conditions server Technical Improvements: - Introduced strongly typed Route and Configuration classes - Simplified route matching logic with dedicated matcher - Improved error handling for configuration loading - Updated unit tests to support new configuration structure The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references. Test Configuration: - Added example configurations for VID:65521/65522, PID:32769 - Updated TC URL endpoints to use port 44538 - Included sample Terms & Conditions responses * server: Add validation checks for SSL certificate and key files Add input validation to verify that SSL certificate and key files exist and are regular files before attempting to create the SSL context. This provides clearer error messages to users when certificate files are missing or invalid, following the same validation pattern used for config files.
ratgr
pushed a commit
to ratgr/connectedhomeip
that referenced
this pull request
Feb 26, 2025
…oading (project-chip#37695) * Refactor mock server to support distributed configuration loading Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation. Key Changes: - Restructured configuration loading to support directory-based routing configs - Added dataclass-based type safety for configuration and route definitions - Updated path handling to use pathlib.Path for better cross-platform support - Modified server launch configuration to support routing config directory - Added configurations for mocking multiple services: * Distributed Compliance Ledger (DCL) * Product Terms & Conditions server Technical Improvements: - Introduced strongly typed Route and Configuration classes - Simplified route matching logic with dedicated matcher - Improved error handling for configuration loading - Updated unit tests to support new configuration structure The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references. Test Configuration: - Added example configurations for VID:65521/65522, PID:32769 - Updated TC URL endpoints to use port 44538 - Included sample Terms & Conditions responses * server: Add validation checks for SSL certificate and key files Add input validation to verify that SSL certificate and key files exist and are regular files before attempting to create the SSL context. This provides clearer error messages to users when certificate files are missing or invalid, following the same validation pattern used for config files.
gmarcosb
pushed a commit
to gmarcosb/connectedhomeip
that referenced
this pull request
Mar 4, 2025
…oading (project-chip#37695) * Refactor mock server to support distributed configuration loading Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation. Key Changes: - Restructured configuration loading to support directory-based routing configs - Added dataclass-based type safety for configuration and route definitions - Updated path handling to use pathlib.Path for better cross-platform support - Modified server launch configuration to support routing config directory - Added configurations for mocking multiple services: * Distributed Compliance Ledger (DCL) * Product Terms & Conditions server Technical Improvements: - Introduced strongly typed Route and Configuration classes - Simplified route matching logic with dedicated matcher - Improved error handling for configuration loading - Updated unit tests to support new configuration structure The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references. Test Configuration: - Added example configurations for VID:65521/65522, PID:32769 - Updated TC URL endpoints to use port 44538 - Included sample Terms & Conditions responses * server: Add validation checks for SSL certificate and key files Add input validation to verify that SSL certificate and key files exist and are regular files before attempting to create the SSL context. This provides clearer error messages to users when certificate files are missing or invalid, following the same validation pattern used for config files.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors the mock server implementation to support loading configuration from multiple JSON files, enabling flexible mocking of different services during Matter device commissioning validation.
Key Changes:
Technical Improvements:
The changes enable quick iteration of mock service responses during preproduction testing and PlugFest validation, particularly for testing new commissioning flows that rely on DCL-based configuration with indirect product server references.
Test Configuration:
Testing
Generate Server Certificate for HTTPS
openssl req -x509 -newkey rsa:2048 -keyout /workspace/connectedhomeip/server.key -out /workspace/connectedhomeip/server.crt -days 365 -nodes -subj "/C=US/ST= /L= /O= /OU= /CN=localhost"
Start Mock DCL Server on localhost:44537
Start Mock Product Server on localhost:44538
Start the Terms and Conditions sample app
Make some sample requests to the servers
Commission DUT with chip-tool