mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-19 15:30:17 +00:00

* 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)
|
|
}
|
|
}
|