mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-22 16:36:27 +01:00
21 lines
303 B
Go
21 lines
303 B
Go
|
package remotewrite
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestInit(t *testing.T) {
|
||
|
oldAddr := *addr
|
||
|
defer func() { *addr = oldAddr }()
|
||
|
|
||
|
*addr = "http://localhost:8428"
|
||
|
cl, err := Init(context.Background())
|
||
|
if err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
if err := cl.Close(); err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
}
|