Skip to content

Commit bf28494

Browse files
stbenjamclaude
andcommitted
Update OTE with HTML viewer enhancements
Vendor updated openshift-tests-extension with: - Timeline view showing when tests ran during the overall run - Time range slider to filter tests by execution window - Output/error search with regex support and match highlighting - Binary and Image filter dropdowns (auto-detected from JSON fields) - RenderResultsHTML function for custom result types Update ToHTML to use RenderResultsHTML which preserves origin's SourceImage and SourceBinary fields in the HTML output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 524d6db commit bf28494

File tree

6 files changed

+531
-52
lines changed

6 files changed

+531
-52
lines changed

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,5 @@ replace (
445445
k8s.io/sample-cli-plugin => github.com/openshift/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20251017123720-96593f323733
446446
k8s.io/sample-controller => github.com/openshift/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20251017123720-96593f323733
447447
)
448+
449+
replace github.com/openshift-eng/openshift-tests-extension => /Users/stbenjam/go/src/github.com/openshift-eng/openshift-tests-extension

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -822,10 +822,6 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE
822822
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
823823
github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8=
824824
github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
825-
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251113163031-356b66aa5c24 h1:bwmjtFaipakIwAyZxnDLgtkLY1Nf1nK9lRCmADvHirE=
826-
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251113163031-356b66aa5c24/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
827-
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251217172351-cc05abe18d3c h1:sHgLbNUWhPjUbPWzaeebzHQILrvedq+/OX1Q0sfKCNc=
828-
github.com/openshift-eng/openshift-tests-extension v0.0.0-20251217172351-cc05abe18d3c/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
829825
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f h1:E72Zoc+JImPehBrXkgaCbIDbSFuItvyX6RCaZ0FQE5k=
830826
github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f/go.mod h1:cDVdp0eda7EHE6tLuSeo4IqPWdAX/KJK+ogBirIGtsI=
831827
github.com/openshift/api v0.0.0-20251015095338-264e80a2b6e7 h1:Ot2fbEEPmF3WlPQkyEW/bUCV38GMugH/UmZvxpWceNc=

pkg/test/extensions/types.go

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package extensions
22

33
import (
4+
"encoding/json"
45
"fmt"
56
"strings"
67

@@ -95,15 +96,35 @@ type ExtensionTestResult struct {
9596
Source Source `json:"source"`
9697
}
9798

98-
// ToHTML converts the extension test results to an HTML representation using the upstream ToHTML method.
99+
// ToHTML converts the extension test results to an HTML representation.
100+
// It marshals origin's results (which include SourceImage/SourceBinary) directly
101+
// and uses RenderResultsHTML to preserve those fields in the HTML output.
99102
func (results ExtensionTestResults) ToHTML(suiteName string) ([]byte, error) {
100-
var upstreamResults extensiontests.ExtensionTestResults
101-
for _, r := range results {
102-
if r != nil && r.ExtensionTestResult != nil {
103-
upstreamResults = append(upstreamResults, r.ExtensionTestResult)
103+
jsonData, err := json.Marshal(results)
104+
if err != nil {
105+
return nil, fmt.Errorf("failed to marshal results: %w", err)
106+
}
107+
108+
// Pare down the output if there's a lot, we want this to load in some reasonable amount of time
109+
if len(jsonData) > 2<<20 {
110+
var copiedResults ExtensionTestResults
111+
if err := json.Unmarshal(jsonData, &copiedResults); err != nil {
112+
return nil, fmt.Errorf("failed to unmarshal results: %w", err)
113+
}
114+
for _, r := range copiedResults {
115+
if r != nil && r.ExtensionTestResult != nil && r.Result == extensiontests.ResultPassed {
116+
r.Error = ""
117+
r.Output = ""
118+
r.Details = nil
119+
}
120+
}
121+
jsonData, err = json.Marshal(copiedResults)
122+
if err != nil {
123+
return nil, fmt.Errorf("failed to marshal results: %w", err)
104124
}
105125
}
106-
return upstreamResults.ToHTML(suiteName)
126+
127+
return extensiontests.RenderResultsHTML(jsonData, suiteName)
107128
}
108129

109130
// EnvironmentFlagName enumerates each possible EnvironmentFlag's name to be passed to the external binary

vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result.go

Lines changed: 22 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)