@@ -644,43 +644,3 @@ func TestAppBrickInstanceModelsDetails(t *testing.T) {
644644 })
645645 }
646646}
647-
648- func TestAppBrickInstanceDetails (t * testing.T ) {
649- bricksIndex , err := bricksindex .GenerateBricksIndexFromFile (paths .New ("testdata" ))
650- require .Nil (t , err )
651- brickService := NewService (nil , bricksIndex , nil )
652- tempDirectory := t .TempDir ()
653-
654- app := app.ArduinoApp {
655- Name : "TestApp" ,
656- Descriptor : app.AppDescriptor {
657- Bricks : []app.Brick {
658- {
659- ID : "arduino:image_classification" ,
660- },
661- },
662- },
663- FullPath : paths .New (tempDirectory ),
664- }
665- configVariables , _ := brickService .AppBrickInstanceDetails (& app , bricksIndex .Bricks [2 ].ID )
666-
667- expectedConfigVariables := BrickInstance {
668- Name : "Image Classification" ,
669- ID : "arduino:image_classification" ,
670- Author : "Arduino" ,
671- Category : "video" ,
672- Status : "installed" ,
673- Variables : map [string ]string {
674- "CUSTOM_MODEL_PATH" : "/home/arduino/.arduino-bricks/ei-models" ,
675- "EI_CLASSIFICATION_MODEL" : "/models/ootb/ei/mobilenet-v2-224px.eim" ,
676- },
677- ConfigVariables : []BrickConfigVariable {
678- {Name : "CUSTOM_MODEL_PATH" , Value : "/home/arduino/.arduino-bricks/ei-models" , Description : "path to the custom model directory" , Required : false },
679- {Name : "EI_CLASSIFICATION_MODEL" , Value : "/models/ootb/ei/mobilenet-v2-224px.eim" , Description : "path to the model file" , Required : false },
680- },
681- RequireModel : true ,
682- ModelID : "mobilenet-image-classification" ,
683- }
684-
685- require .Equal (t , expectedConfigVariables , configVariables )
686- }
0 commit comments