Skip to content

Commit c701841

Browse files
committed
fix test end2end
1 parent 24d1b09 commit c701841

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

internal/api/docs/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,13 @@ components:
11721172
type: string
11731173
type: object
11741174
AIModelLite:
1175+
properties:
1176+
description:
1177+
type: string
1178+
id:
1179+
type: string
1180+
name:
1181+
type: string
11751182
type: object
11761183
AIModelsListResult:
11771184
properties:

internal/e2e/client/client.gen.go

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/e2e/daemon/brick_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
"github.com/arduino/arduino-app-cli/internal/e2e/client"
3131
"github.com/arduino/arduino-app-cli/internal/orchestrator/bricksindex"
3232
"github.com/arduino/arduino-app-cli/internal/orchestrator/config"
33-
"github.com/arduino/arduino-app-cli/internal/orchestrator/modelsindex"
3433
"github.com/arduino/arduino-app-cli/internal/store"
3534
)
3635

@@ -116,16 +115,16 @@ func TestBricksDetails(t *testing.T) {
116115
},
117116
}
118117

119-
expectedModelLiteInfo := []modelsindex.AIModelLite{
118+
expectedModelLiteInfo := []client.AIModelLite{
120119
{
121-
ID: "mobilenet-image-classification",
122-
Name: "General purpose image classification",
123-
ModuleDescription: "General purpose image classification model based on MobileNetV2. This model is trained on the ImageNet dataset and can classify images into 1000 categories.",
120+
Id: f.Ptr("mobilenet-image-classification"),
121+
Name: f.Ptr("General purpose image classification"),
122+
Description: f.Ptr("General purpose image classification model based on MobileNetV2. This model is trained on the ImageNet dataset and can classify images into 1000 categories."),
124123
},
125124
{
126-
ID: "person-classification",
127-
Name: "Person classification",
128-
ModuleDescription: "Person classification model based on WakeVision dataset. This model is trained to classify images into two categories: person and not-person.",
125+
Id: f.Ptr("person-classification"),
126+
Name: f.Ptr("Person classification"),
127+
Description: f.Ptr("Person classification model based on WakeVision dataset. This model is trained to classify images into two categories: person and not-person."),
129128
}}
130129
response, err := httpClient.GetBrickDetailsWithResponse(t.Context(), validBrickID, func(ctx context.Context, req *http.Request) error { return nil })
131130
require.NoError(t, err)

internal/orchestrator/modelsindex/models_index.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ type AIModel struct {
5454
}
5555

5656
type AIModelLite struct {
57-
ID string `yaml:"-"`
58-
Name string `yaml:"name"`
59-
ModuleDescription string `yaml:"description"`
57+
ID string `json:"id"`
58+
Name string `json:"name"`
59+
ModuleDescription string `json:"description"`
6060
}
6161

6262
type ModelsIndex struct {

0 commit comments

Comments
 (0)