Skip to content

Commit b4dad50

Browse files
committed
code review fixes
1 parent 78bf6f3 commit b4dad50

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

internal/e2e/daemon/brick_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"github.com/arduino/arduino-app-cli/internal/store"
3434
)
3535

36-
func setupTesBrick(t *testing.T) (*client.CreateAppResp, *client.ClientWithResponses) {
36+
func setupTestBrick(t *testing.T) (*client.CreateAppResp, *client.ClientWithResponses) {
3737
httpClient := GetHttpclient(t)
3838
createResp, err := httpClient.CreateAppWithResponse(
3939
t.Context(),
@@ -87,7 +87,7 @@ func TestBricksList(t *testing.T) {
8787
}
8888

8989
func TestBricksDetails(t *testing.T) {
90-
_, httpClient := setupTesBrick(t)
90+
_, httpClient := setupTestBrick(t)
9191

9292
t.Run("should return 404 Not Found for an invalid brick ID", func(t *testing.T) {
9393
invalidBrickID := "notvalidBrickId"

internal/orchestrator/bricks/bricks.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ func (s *Service) BricksDetails(id string, idProvider *app.IDProvider,
165165

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

@@ -204,7 +203,6 @@ func getUsedByApps(
204203
}
205204
return false
206205
}, paths.FilterDirectories(), paths.FilterOutNames("python", "sketch", ".cache"))
207-
208206
if err != nil {
209207
slog.Error("unable to list apps", slog.String("error", err.Error()))
210208
return usedByApps, err
@@ -215,7 +213,7 @@ func getUsedByApps(
215213
for _, file := range appPaths {
216214
app, err := app.Load(file.String())
217215
if err != nil {
218-
// we are not considering the borken apps
216+
// we are not considering the broken apps
219217
slog.Warn("unable to parse app.yaml, skipping", "path", file.String(), "error", err.Error())
220218
continue
221219
}

0 commit comments

Comments
 (0)