Conversation
…or port 8017. Add a second error message for test using SSL to confirm error when connecting to non-SSL REST service. Message probably changed for ML12 (not sure, but error message in test does not work).
There was a problem hiding this comment.
Pull Request Overview
Fix SSL-related test failures by updating docker port configurations and improving error message handling. The changes ensure SSL tests can properly connect to port 8017 and handle different error message formats that may occur during SSL-to-HTTP connection attempts.
- Exposed port 8017 in docker-compose configurations to enable SSL test connectivity
- Enhanced error message matching in SSL tests to handle multiple possible error formats
- Updated both standard and nightly docker-compose files for consistency
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test-basic/client.js | Enhanced error message assertion to handle both configuration error and protocol error messages |
| test-app/docker-compose.yaml | Extended port range from 8015-8016 to 8015-8017 to include SSL test port |
| test-app/docker-compose-nightlies.yaml | Extended port range from 8000-8016 to 8000-8017 to include SSL test port |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| assert(error.message.toString().includes('You have attempted to access an HTTP server using HTTPS. Please check your configuration.') || | ||
| error.message.toString().includes('write EPROTO')); |
There was a problem hiding this comment.
The error message checking logic is duplicated with error.message.toString() called twice. Consider storing the result in a variable to improve readability and avoid redundant computation.
| assert(error.message.toString().includes('You have attempted to access an HTTP server using HTTPS. Please check your configuration.') || | |
| error.message.toString().includes('write EPROTO')); | |
| const errorMsg = error.message.toString(); | |
| assert(errorMsg.includes('You have attempted to access an HTTP server using HTTPS. Please check your configuration.') || | |
| errorMsg.includes('write EPROTO')); |
|
Looks good. Please merge if the Jenkins PR-build succeeds. Thanks.! |
Fix SSL tests by exposing port 8017 in docker-compose files and adding new matching error message text in the SSL to non-SSL REST service test assert call.