wuxiansen opened a new pull request, #9968:
URL: https://github.com/apache/seatunnel/pull/9968
Fix logs Basic issue
## Contribution Checklist
### Purpose of this pull request
This pull request supplements test cases for fixing basic log-related
issues, ensuring that the logging functionality works correctly in scenarios
where HTTP Basic authentication is enabled. By adding the RestApiHttpBasicTest
test class, it verifies the correctness of log-related REST API responses with
Basic authentication, including interface accessibility, response format, and
content integrity, further ensuring the stability of the logging feature.
### Does this PR introduce _any_ user-facing change?
No. The added test cases are solely for internal functional verification and
do not involve changes to user-visible behaviors, configuration methods, or
output results. They have no impact on user workflows.
### How was this patch tested?
1. New test cases: The RestApiHttpBasicTest class was implemented to
specifically test the behavior of log-related REST APIs when HTTP Basic
authentication is enabled, including:
Verifying that the /overview endpoint returns a 200 OK status and contains
necessary fields (e.g., projectVersion) with valid authentication.
Testing the /logs endpoint with different formats (e.g., JSON) to check for
non-empty responses, correct status codes, and expected Content-Type headers.
Simulating job submission and validating that the log endpoint correctly
returns job log information.
2. Test environment: A test cluster was set up using Hazelcast in local
mode, with HTTP port and Basic authentication credentials (username admin,
password admin) configured to match real-world scenarios.
3. Execution method: Tests were run using JUnit 5 to automatically verify
interface behavior. All assertions passing indicate that the functionality
works as expected.
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License
Notice according
[New License
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [ ] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If you are contributing the connector code, please check that the
following files are updated:
1. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it
2. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]