Added otel tracing to show command (#2734)

Signed-off-by: James Humphries <james@james-humphries.co.uk>
This commit is contained in:
James Humphries
2025-05-22 15:10:23 +01:00
committed by GitHub
parent 6f0d3d3a07
commit dd8acbb113
10 changed files with 83 additions and 45 deletions

View File

@@ -75,7 +75,7 @@ func TestShowHuman_DisplayPlan(t *testing.T) {
view.Configure(&arguments.View{NoColor: true})
v := NewShow(arguments.ViewHuman, view)
code := v.DisplayPlan(testCase.plan, testCase.jsonPlan, nil, nil, testCase.schemas)
code := v.DisplayPlan(t.Context(), testCase.plan, testCase.jsonPlan, nil, nil, testCase.schemas)
if code != 0 {
t.Errorf("expected 0 return code, got %d", code)
}
@@ -131,7 +131,7 @@ func TestShowHuman_DisplayState(t *testing.T) {
view.Configure(&arguments.View{NoColor: true})
v := NewShow(arguments.ViewHuman, view)
code := v.DisplayState(testCase.stateFile, testCase.schemas)
code := v.DisplayState(t.Context(), testCase.stateFile, testCase.schemas)
if code != 0 {
t.Errorf("expected 0 return code, got %d", code)
}
@@ -225,7 +225,7 @@ func TestShowJSON_DisplayPlan(t *testing.T) {
},
}
code := v.DisplayPlan(testCase.plan, testCase.jsonPlan, config, testCase.stateFile, schemas)
code := v.DisplayPlan(t.Context(), testCase.plan, testCase.jsonPlan, config, testCase.stateFile, schemas)
if code != 0 {
t.Errorf("expected 0 return code, got %d", code)
@@ -290,7 +290,7 @@ func TestShowJSON_DisplayState(t *testing.T) {
},
}
code := v.DisplayState(testCase.stateFile, schemas)
code := v.DisplayState(t.Context(), testCase.stateFile, schemas)
if code != 0 {
t.Errorf("expected 0 return code, got %d", code)