fix: failing compilation and failing tests
nclazz/soundwerft/pipeline/head This commit looks good Details

master
Niclas Thobaben 2024-02-28 22:20:07 +01:00
parent 0d34ef4702
commit cc1ca20161
3 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,7 @@
.DEFAULT_GOAL: all
.PHONY: all
all: check build ## Build and test the complete project
all: generate check build ## Build and test the complete project
.PHONY: help
help: ## Display this help

View File

@ -2,6 +2,7 @@ package integrationtest
import (
"git.l--n.de/nclazz/soundwerft/api"
"git.l--n.de/nclazz/soundwerft/internal/app"
"git.l--n.de/nclazz/soundwerft/pkg/localizer"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
@ -12,6 +13,8 @@ import (
func TestSetupApi(t *testing.T) {
server := api.New(
&app.Services{},
&app.Repositories{},
api.WithRandomPort(),
api.WithWorkingDir("../.."),
api.WithLocalizer(localizer.NewMock()),

View File

@ -3,6 +3,8 @@ package testutils
import (
"git.l--n.de/nclazz/soundwerft/api/handler"
"github.com/labstack/echo/v4"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)
type HandlerFactory struct {
@ -23,7 +25,9 @@ func NewHandlerFactory(opts ...HandlerFactoryOption) *HandlerFactory {
}
func (h *HandlerFactory) NewMockHandler() *handler.Handler {
bundle := i18n.NewBundle(language.English)
return &handler.Handler{
Echo: h.Echo,
Echo: h.Echo,
Localizer: i18n.NewLocalizer(bundle),
}
}