mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 21:48:04 +08:00
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:
@@ -101,7 +101,8 @@ func CheckExtEndPointQuery(config SearchConfig, requiredQueries ...GQLQuery) err
|
||||
|
||||
discoverResponse := &distext.ExtensionList{}
|
||||
|
||||
_, err = makeGETRequest(ctx, discoverEndPoint, username, password, config.VerifyTLS,
|
||||
_, err = config.SearchService.getHTTPClient().makeGETRequest(
|
||||
ctx, discoverEndPoint, username, password, config.VerifyTLS,
|
||||
config.Debug, &discoverResponse, config.ResultWriter)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -152,7 +153,8 @@ func CheckExtEndPointQuery(config SearchConfig, requiredQueries ...GQLQuery) err
|
||||
|
||||
queryResponse := &schemaList{}
|
||||
|
||||
err = makeGraphQLRequest(ctx, searchEndPoint, schemaQuery, username, password, config.VerifyTLS,
|
||||
err = config.SearchService.getHTTPClient().makeGraphQLRequest(
|
||||
ctx, searchEndPoint, schemaQuery, username, password, config.VerifyTLS,
|
||||
config.Debug, queryResponse, config.ResultWriter)
|
||||
if err != nil {
|
||||
return fmt.Errorf("gql query failed: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user