Add more unit tests

This commit is contained in:
Jamie Curnow
2024-11-07 13:00:07 +10:00
parent 208037946f
commit 3774a40498
14 changed files with 810 additions and 24 deletions

View File

@ -1,7 +1,6 @@
package validator
import (
"npm/internal/entity/nginxtemplate"
"npm/internal/entity/upstream"
"github.com/rotisserie/eris"
@ -26,7 +25,7 @@ func ValidateUpstream(u upstream.Model) error {
}
// Check the nginx template exists and has the same type.
nginxTemplate, err := nginxtemplate.GetByID(u.NginxTemplateID)
nginxTemplate, err := nginxtemplateGetByID(u.NginxTemplateID)
if err != nil {
return eris.Errorf("Nginx Template #%d does not exist", u.NginxTemplateID)
}