mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 06:31:59 +08:00

* fix: use common timeout middleware * fix: use apiserver factory for config * fix: add backward compatibility for old variables * fix: remove apiserver provider and use config directly * fix: remove apiserver interface * fix: address comments * fix: address minor comments * fix: address minor comments
22 lines
483 B
Go
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/")
|
|
})
|
|
})
|
|
}
|