VictoriaMetrics/app/vmalert/remotewrite/init_test.go
Roman Khavronenko 8fdd613f25
Vmalert tests (#3975)
* 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>
2023-03-17 15:57:24 +01:00

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