Adjust + Test
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user