Skip to content

Commit 1e19ef0

Browse files
dido18lucarin91
authored andcommitted
fix(tests): correct model retrieval order in TestGenerateModelsIndexFromFile
1 parent e3eec7b commit 1e19ef0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/orchestrator/modelsindex/modelsindex_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ func TestGenerateModelsIndexFromFile(t *testing.T) {
2222
modelsIndex, err := GenerateModelsIndexFromFile(paths.New("testdata"))
2323
require.NoError(t, err)
2424

25-
model, found := modelsIndex.GetModelByID("face-detection")
25+
model, found := modelsIndex.GetModelByID("not-existing-model")
26+
assert.False(t, found)
27+
assert.Nil(t, model)
28+
29+
model, found = modelsIndex.GetModelByID("face-detection")
2630
assert.Equal(t, "brick", model.Runner)
2731
require.True(t, found, "face-detection should be found")
2832
assert.Equal(t, "face-detection", model.ID)

0 commit comments

Comments
 (0)