Add more unit tests

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

No files matched your search

+1 -2
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)
}