Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsanan1 committed Sep 25, 2024
1 parent 634664c commit 0702d6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
14 changes: 0 additions & 14 deletions apim-apk-agent/internal/synchronizer/ratelimit_policy_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,6 @@ func FetchSubscriptionRateLimitPoliciesOnEvent(ratelimitName string, organizatio
return
}
responseBytes, err := ioutil.ReadAll(resp.Body)
var jsonResponse interface{}
err = json.Unmarshal(responseBytes, &jsonResponse)
if err != nil {
logger.LoggerSynchronizer.Infof("Error unmarshalling JSON:", err)
return
}

// Print the JSON response in a pretty format
jsonOutput, err := json.MarshalIndent(jsonResponse, "", " ")
if err != nil {
logger.LoggerSynchronizer.Infof("Error formatting JSON:", err)
return
}
logger.LoggerSynchronizer.Infof("Json string: %s", string(jsonOutput))
logger.LoggerSynchronizer.Debugf("Response String received for Policies: %v", string(responseBytes))

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion apim-apk-agent/internal/utils/apis_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func FetchAPIsOnEvent(conf *config.Config, apiUUID *string, k8sClient client.Cli
logger.LoggerUtils.Errorf("Error while generating APK-Conf: %v", apkErr)
return nil, err
}
logger.LoggerUtils.Infof("APK Conf: %v", apkConf)
logger.LoggerUtils.Debugf("APK Conf: %v", apkConf)
certContainer := transformer.CertContainer{
ClientCertObj: artifact.CertMeta,
EndpointCertObj: artifact.EndpointCertMeta,
Expand Down
5 changes: 2 additions & 3 deletions apim-apk-agent/pkg/synchronizer/apis_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ func SendRequestToControlPlane(req *http.Request, apiID *string, gwLabels []stri
client *http.Client) bool {
// Make the request
if apiID != nil {
logger.LoggerSync.Infof("Sending the control plane request for the API: %q", *apiID)
logger.LoggerSync.Debugf("Sending the control plane request for the API: %q", *apiID)
} else {
logger.LoggerSync.Info("Sending the control plane request")
logger.LoggerSync.Infof("Sending url: %s", req.URL.String())
logger.LoggerSync.Debugf("Sending the control plane request, url: %s", req.URL.String())
}
resp, err := client.Do(req)

Expand Down

0 comments on commit 0702d6a

Please sign in to comment.