mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-23 09:28:20 +08:00
21 lines
482 B
Go
21 lines
482 B
Go
package constants
|
|
|
|
import (
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
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/")
|
|
})
|
|
})
|
|
}
|