Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code review fixes
  • Loading branch information
mirkoCrobu committed Nov 3, 2025
commit b4dad504ee605824d7857a31b0f249d400ba8059
4 changes: 2 additions & 2 deletions internal/e2e/daemon/brick_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/arduino/arduino-app-cli/internal/store"
)

func setupTesBrick(t *testing.T) (*client.CreateAppResp, *client.ClientWithResponses) {
func setupTestBrick(t *testing.T) (*client.CreateAppResp, *client.ClientWithResponses) {
httpClient := GetHttpclient(t)
createResp, err := httpClient.CreateAppWithResponse(
t.Context(),
Expand Down Expand Up @@ -87,7 +87,7 @@ func TestBricksList(t *testing.T) {
}

func TestBricksDetails(t *testing.T) {
_, httpClient := setupTesBrick(t)
_, httpClient := setupTestBrick(t)

t.Run("should return 404 Not Found for an invalid brick ID", func(t *testing.T) {
invalidBrickID := "notvalidBrickId"
Expand Down
4 changes: 1 addition & 3 deletions internal/orchestrator/bricks/bricks.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ func (s *Service) BricksDetails(id string, idProvider *app.IDProvider,

usedByApps, err := getUsedByApps(cfg, brick.ID, idProvider)
if err != nil {
slog.Error("unable to get used by apps", slog.String("error", err.Error()))
return BrickDetailsResult{}, fmt.Errorf("unable to get used by apps: %w", err)
}

Expand Down Expand Up @@ -204,7 +203,6 @@ func getUsedByApps(
}
return false
}, paths.FilterDirectories(), paths.FilterOutNames("python", "sketch", ".cache"))

if err != nil {
slog.Error("unable to list apps", slog.String("error", err.Error()))
return usedByApps, err
Expand All @@ -215,7 +213,7 @@ func getUsedByApps(
for _, file := range appPaths {
app, err := app.Load(file.String())
if err != nil {
// we are not considering the borken apps
// we are not considering the broken apps
slog.Warn("unable to parse app.yaml, skipping", "path", file.String(), "error", err.Error())
continue
}
Expand Down