/
githubmirror
/
grafana
Обзор
Документация
Войти
/
githubmirror
/
grafana
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
pkg/tests/alertmanager/postgres.go
41 строка
667 B
Tito Lins
Alerting: Add alertmanager integration tests (#100106)
13 фев 2025, 13:36
Не верифицирован
13 фев 2025, 13:36
ae9837b
Код
Авторство
О чём код?
package alertmanager import ( "os" "github.com/grafana/e2e" ) const ( defaultPostgresImage = "postgres:16.4" postgresHTTPPort = 5432 ) // GetDefaultImage returns the Docker image to use to run the Postgres.. func GetPostgresImage() string { if img := os.Getenv("POSTGRES_IMAGE"); img != "" { return img } return defaultPostgresImage } type PostgresService struct { *e2e.HTTPService } func NewPostgresService(name string, envVars map[string]string) *PostgresService { svc := &PostgresService{ HTTPService: e2e.NewHTTPService( name, GetPostgresImage(), nil, nil, postgresHTTPPort, ), } svc.SetEnvVars(envVars) return svc }