mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
8fdd613f25
* vmalert: add tests for notifier pkg * vmalert: add tests for remotewrite pkg * vmalert: add tests for template functions * vmalert: add tests for web pages * vmalert: fix int overflow in tests Signed-off-by: hagen1778 <roman@victoriametrics.com>
20 lines
303 B
Go
20 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)
|
|
}
|
|
}
|