Files
core/http/handler/api/log_test.go
Jan Stabenow eb1cc37456 Add GoSRT & improvements (repo-merge)
Commits (Ingo Oppermann):
- Add experimental SRT connection stats and logs
- Hide /config/reload endpoint in reade-only mode
- Add SRT server
- Create v16 in go.mod
- Fix data races, tests, lint, and update dependencies
- Add trailing slash for routed directories (datarhei/restreamer#340)
- Allow relative URLs in content in static routes

Co-Authored-By: Ingo Oppermann <57445+ioppermann@users.noreply.github.com>
2022-06-23 22:13:58 +02:00

29 lines
495 B
Go

package api
import (
"net/http"
"testing"
"github.com/datarhei/core/v16/http/api"
"github.com/datarhei/core/v16/http/mock"
"github.com/labstack/echo/v4"
)
func getDummyLogRouter() *echo.Echo {
router := mock.DummyEcho()
handler := NewLog(nil)
router.Add("GET", "/", handler.Log)
return router
}
func TestLog(t *testing.T) {
router := getDummyLogRouter()
response := mock.Request(t, http.StatusOK, router, "GET", "/", nil)
mock.Validate(t, []api.LogEvent{}, response.Data)
}