mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00: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)
|
||
|
}
|
||
|
}
|