Adjust + Test

This commit is contained in:
mr
2026-02-18 12:24:19 +01:00
parent 842e09f22f
commit fa5c3a3c60
45 changed files with 1166 additions and 1192 deletions

View File

@@ -1,17 +1,17 @@
package models
import (
"strconv"
"testing"
"cloud.o-forge.io/core/oc-lib/models"
"cloud.o-forge.io/core/oc-lib/tools"
"github.com/stretchr/testify/assert"
)
func TestModel_ReturnsValidInstances(t *testing.T) {
for name, _ := range models.ModelsCatalog {
for name := range models.ModelsCatalog {
t.Run(name, func(t *testing.T) {
modelInt, _ := strconv.Atoi(name)
modelInt := tools.FromString(name)
obj := models.Model(modelInt)
assert.NotNil(t, obj, "Model() returned nil for valid model name %s", name)
})