Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aboitreaud committed Dec 20, 2024
1 parent 034b271 commit 918a260
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/fleet/installer/setup/djm/emr.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func setupEmrResourceManager(s *common.Setup, clusterName string) {
}

var executeCommandWithTimeout = func(s *common.Setup, command string, args ...string) (output []byte, err error) {
span, ctx := telemetry.StartSpanFromContext(s.Ctx, "setup.command")
span, _ := telemetry.StartSpanFromContext(s.Ctx, "setup.command")
span.SetResourceName(command)
defer func() { span.Finish(err) }()

Expand Down
5 changes: 4 additions & 1 deletion pkg/fleet/installer/setup/djm/emr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ func TestSetupEmr(t *testing.T) {
originalExecuteCommand := executeCommandWithTimeout
defer func() { executeCommandWithTimeout = originalExecuteCommand }() // Restore original after test

executeCommandWithTimeout = func(s *common.Setup, command string, args ...string) ([]byte, error) {
executeCommandWithTimeout = func(s *common.Setup, command string, args ...string) (output []byte, err error) {
span, _ := telemetry.StartSpanFromContext(s.Ctx, "setup.command")
span.SetResourceName(command)
defer func() { span.Finish(err) }()
if command == "aws" && args[0] == "emr" && args[1] == "describe-cluster" {
return []byte(emrDescribeClusterResponse), nil
}
Expand Down

0 comments on commit 918a260

Please sign in to comment.