refactor: enhance TLS cert generation and refactor HTTP client architecture (#3638)

- Refactored HTTP client from global cache to struct-based approach (global state was shared between tests, including what certificates to use)
- Enhanced pkg/test/tls to support ECDSA and ED25519 key types
- Replaced static certificate files with dynamic generation in golang tests
- Fixed test cleanup issues and improved resource management

This eliminates dependency on external cert generation scripts and
improves test maintainability.

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
This commit is contained in:
Andrei Aaron
2025-12-13 09:47:32 +02:00
committed by GitHub
parent 1447bb24b4
commit cf8b0bdbf9
22 changed files with 1590 additions and 554 deletions
+4 -2
View File
@@ -58,7 +58,8 @@ func GetServerStatus(config SearchConfig) error {
return err
}
_, err = makeGETRequest(ctx, checkAPISupportEndpoint, username, password, config.VerifyTLS, config.Debug,
_, err = config.SearchService.getHTTPClient().makeGETRequest(
ctx, checkAPISupportEndpoint, username, password, config.VerifyTLS, config.Debug,
nil, config.ResultWriter)
if err != nil {
serverInfo := ServerInfo{}
@@ -87,7 +88,8 @@ func GetServerStatus(config SearchConfig) error {
serverInfo := ServerInfo{}
_, err = makeGETRequest(ctx, mgmtEndpoint, username, password, config.VerifyTLS, config.Debug,
_, err = config.SearchService.getHTTPClient().makeGETRequest(
ctx, mgmtEndpoint, username, password, config.VerifyTLS, config.Debug,
&serverInfo, config.ResultWriter)
switch {