From 06b486b41e233eeb8c772fb18c04ed83567cd56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Pazos?= Date: Wed, 11 Oct 2023 17:25:07 -0300 Subject: [PATCH] cleanup: remove hardcoded fake url for testing --- storage/remote/write.go | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/storage/remote/write.go b/storage/remote/write.go index 25d79da11..b52fb7c4a 100644 --- a/storage/remote/write.go +++ b/storage/remote/write.go @@ -155,23 +155,18 @@ func (rws *WriteStorage) ApplyConfig(conf *config.Config) error { name = rwConf.Name } - var c WriteClient - if rwConf.URL.String() == "fake" { - // f := "fake" + strconv.Itoa(rand.Intn(100)) - // c = NewTestClient(f, f) - } else { - c, err = NewWriteClient(name, &ClientConfig{ - URL: rwConf.URL, - Timeout: rwConf.RemoteTimeout, - HTTPClientConfig: rwConf.HTTPClientConfig, - SigV4Config: rwConf.SigV4Config, - AzureADConfig: rwConf.AzureADConfig, - Headers: rwConf.Headers, - RetryOnRateLimit: rwConf.QueueConfig.RetryOnRateLimit, - }) - if err != nil { - return err - } + c, err := NewWriteClient(name, &ClientConfig{ + URL: rwConf.URL, + Timeout: rwConf.RemoteTimeout, + HTTPClientConfig: rwConf.HTTPClientConfig, + SigV4Config: rwConf.SigV4Config, + AzureADConfig: rwConf.AzureADConfig, + Headers: rwConf.Headers, + RetryOnRateLimit: rwConf.QueueConfig.RetryOnRateLimit, + }) + + if err != nil { + return err } queue, ok := rws.queues[hash]