Skip to content

Commit 17c3280

Browse files
Yuriy TeodorovychYuriy Teodorovych
authored andcommitted
fix maasModelRefUnstructured missing 5th param
1 parent 5c72c87 commit 17c3280

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

maas-api/internal/handlers/models_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -596,9 +596,9 @@ func TestListModels_ReturnAllModels(t *testing.T) {
596596
// Setup MaaSModelRef lister with three models
597597
lister := fakeMaaSModelRefLister{
598598
"test-ns": []*unstructured.Unstructured{
599-
maasModelRefUnstructured("model-1", "test-ns", model1Server.URL, true),
600-
maasModelRefUnstructured("model-2", "test-ns", model2Server.URL, true),
601-
maasModelRefUnstructured("model-3", "test-ns", model3Server.URL, true),
599+
maasModelRefUnstructured("model-1", "test-ns", model1Server.URL, true, nil),
600+
maasModelRefUnstructured("model-2", "test-ns", model2Server.URL, true, nil),
601+
maasModelRefUnstructured("model-3", "test-ns", model3Server.URL, true, nil),
602602
},
603603
}
604604

@@ -794,7 +794,7 @@ func TestListModels_DeduplicationBySubscription(t *testing.T) {
794794
// Setup MaaSModelRef lister with one model
795795
lister := fakeMaaSModelRefLister{
796796
"test-ns": []*unstructured.Unstructured{
797-
maasModelRefUnstructured("shared-model", "test-ns", modelServer.URL, true),
797+
maasModelRefUnstructured("shared-model", "test-ns", modelServer.URL, true, nil),
798798
},
799799
}
800800

@@ -903,10 +903,10 @@ func TestListModels_DifferentModelRefsWithSameModelID(t *testing.T) {
903903
// Setup MaaSModelRef lister with two different MaaSModelRefs that return same model ID
904904
lister := fakeMaaSModelRefLister{
905905
"namespace-a": []*unstructured.Unstructured{
906-
maasModelRefUnstructured("gpt-4-ref", "namespace-a", modelServerA.URL, true),
906+
maasModelRefUnstructured("gpt-4-ref", "namespace-a", modelServerA.URL, true, nil),
907907
},
908908
"namespace-b": []*unstructured.Unstructured{
909-
maasModelRefUnstructured("gpt-4-ref", "namespace-b", modelServerB.URL, true),
909+
maasModelRefUnstructured("gpt-4-ref", "namespace-b", modelServerB.URL, true, nil),
910910
},
911911
}
912912

@@ -1003,10 +1003,10 @@ func TestListModels_DifferentModelRefsWithSameURLAndModelID(t *testing.T) {
10031003
// Setup MaaSModelRef lister with two different MaaSModelRefs pointing to the SAME URL
10041004
lister := fakeMaaSModelRefLister{
10051005
"namespace-a": []*unstructured.Unstructured{
1006-
maasModelRefUnstructured("gpt-4-ref", "namespace-a", sharedModelServer.URL, true),
1006+
maasModelRefUnstructured("gpt-4-ref", "namespace-a", sharedModelServer.URL, true, nil),
10071007
},
10081008
"namespace-b": []*unstructured.Unstructured{
1009-
maasModelRefUnstructured("gpt-4-another-ref", "namespace-b", sharedModelServer.URL, true),
1009+
maasModelRefUnstructured("gpt-4-another-ref", "namespace-b", sharedModelServer.URL, true, nil),
10101010
},
10111011
}
10121012

@@ -1101,10 +1101,10 @@ func TestListModels_DifferentModelRefsWithSameModelIDAndDifferentSubscriptions(t
11011101
// Setup MaaSModelRef lister with two different MaaSModelRefs in different namespaces
11021102
lister := fakeMaaSModelRefLister{
11031103
"namespace-a": []*unstructured.Unstructured{
1104-
maasModelRefUnstructured("gpt-4-ref", "namespace-a", modelServerA.URL, true),
1104+
maasModelRefUnstructured("gpt-4-ref", "namespace-a", modelServerA.URL, true, nil),
11051105
},
11061106
"namespace-b": []*unstructured.Unstructured{
1107-
maasModelRefUnstructured("gpt-4-ref", "namespace-b", modelServerB.URL, true),
1107+
maasModelRefUnstructured("gpt-4-ref", "namespace-b", modelServerB.URL, true, nil),
11081108
},
11091109
}
11101110

0 commit comments

Comments
 (0)