From 0f08e7658f43213f8d3081a3d53c56d6bd0bf72e Mon Sep 17 00:00:00 2001 From: Alan Moran Date: Thu, 31 Oct 2024 11:11:46 +0100 Subject: [PATCH] Remove duplicate setupRequest function in metricsforwarder server tests --- .../metricsforwarder/server/server_test.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/autoscaler/metricsforwarder/server/server_test.go b/src/autoscaler/metricsforwarder/server/server_test.go index cfade173de..e6b641aec2 100644 --- a/src/autoscaler/metricsforwarder/server/server_test.go +++ b/src/autoscaler/metricsforwarder/server/server_test.go @@ -27,20 +27,6 @@ func setupRequest(method string, url *url.URL, body []byte) (*http.Request, erro return req, nil } - -// Helper function to set up a new client and request -func setupRequest(method, url, authHeader string, body []byte) (*http.Client, *http.Request, error) { - client := &http.Client{} - req, err := newRequest(method, url, body) - if err != nil { - return nil, nil, err - } - if authHeader != "" { - req.Header.Add("Authorization", authHeader) - } - return client, req, nil -} - var _ = Describe("CustomMetricsConfig Server", func() { var (