cleanup: remove hardcoded fake url for testing

Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
Nicolás Pazos 2023-10-11 17:25:07 -03:00
parent 26673bcbde
commit 98a0d00eb2

View file

@ -165,23 +165,18 @@ func (rws *WriteStorage) ApplyConfig(conf *config.Config) error {
name = rwConf.Name name = rwConf.Name
} }
var c WriteClient c, err := NewWriteClient(name, &ClientConfig{
if rwConf.URL.String() == "fake" { URL: rwConf.URL,
// f := "fake" + strconv.Itoa(rand.Intn(100)) Timeout: rwConf.RemoteTimeout,
// c = NewTestClient(f, f) HTTPClientConfig: rwConf.HTTPClientConfig,
} else { SigV4Config: rwConf.SigV4Config,
c, err = NewWriteClient(name, &ClientConfig{ AzureADConfig: rwConf.AzureADConfig,
URL: rwConf.URL, Headers: rwConf.Headers,
Timeout: rwConf.RemoteTimeout, RetryOnRateLimit: rwConf.QueueConfig.RetryOnRateLimit,
HTTPClientConfig: rwConf.HTTPClientConfig, })
SigV4Config: rwConf.SigV4Config,
AzureADConfig: rwConf.AzureADConfig, if err != nil {
Headers: rwConf.Headers, return err
RetryOnRateLimit: rwConf.QueueConfig.RetryOnRateLimit,
})
if err != nil {
return err
}
} }
queue, ok := rws.queues[hash] queue, ok := rws.queues[hash]