signoz/pkg/query-service/constants/constants_test.go
Vishal Sharma 642ece288e
perf: Query-service Performance Improvements (traces) (#838)
*feat: Update query-service Go version to 1.17 #911
*chore: Upgrade to clickhouse versions v2 #751
*feat: Duration sorting in events table of Trace-filter page #826
*feat: Add grpc status code to traces view #975
*feat: added filtering by resource attributes #881
2022-05-03 11:20:57 +05:30

22 lines
483 B
Go

package constants
import (
"os"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestGetAlertManagerApiPrefix(t *testing.T) {
Convey("TestGetAlertManagerApiPrefix", t, func() {
res := GetAlertManagerApiPrefix()
So(res, ShouldEqual, "http://alertmanager:9093/api/")
Convey("WithEnvSet", func() {
os.Setenv("ALERTMANAGER_API_PREFIX", "http://test:9093/api/")
res = GetAlertManagerApiPrefix()
So(res, ShouldEqual, "http://test:9093/api/")
})
})
}