/
wax_boy
/
semaphore_custom
Обзор
Документация
Войти
/
wax_boy
/
semaphore_custom
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
api/api_test.go
44 строки
541 B
Befikadu
feat(metrics): add Prometheus metrics support and tests
14 июл 2026, 12:06
14 июл 2026, 12:06
8b2c75b
Код
Авторство
О чём код?
package api import ( "net/http" "net/http/httptest" "testing" "github.com/semaphoreui/semaphore/util" ) func TestApiPing(t *testing.T) { util.Config = &util.ConfigType{ Debugging: &util.DebuggingConfig{}, } req, _ := http.NewRequest("GET", "/api/ping", nil) rr := httptest.NewRecorder() r := Route( nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ) r.ServeHTTP(rr, req) if rr.Code != 200 { t.Errorf("Response code should be 200 %d", rr.Code) } }