Skip to content

Commit

Permalink
SucceededTrailTests sorted in report
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <[email protected]>
  • Loading branch information
mlavacca committed Sep 5, 2024
1 parent 012d290 commit 8e0ad7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions conformance/utils/suite/reports.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package suite

import (
"fmt"
"sort"

"k8s.io/apimachinery/pkg/util/sets"

Expand Down Expand Up @@ -137,10 +136,7 @@ func (p profileReportsMap) compileResults(supportedFeaturesMap map[ConformancePr
supportedFeatures := supportedFeaturesMap[ConformanceProfileName(report.Name)]
if report.Extended != nil {
if supportedFeatures != nil {
supportedFeatures := supportedFeatures.UnsortedList()
sort.Slice(supportedFeatures, func(i, j int) bool {
return supportedFeatures[i] < supportedFeatures[j]
})
supportedFeatures := sets.List(supportedFeatures)
for _, f := range supportedFeatures {
report.Extended.SupportedFeatures = append(report.Extended.SupportedFeatures, string(f))
}
Expand All @@ -150,10 +146,7 @@ func (p profileReportsMap) compileResults(supportedFeaturesMap map[ConformancePr
unsupportedFeatures := unsupportedFeaturesMap[ConformanceProfileName(report.Name)]
if report.Extended != nil {
if unsupportedFeatures != nil {
unsupportedFeatures := unsupportedFeatures.UnsortedList()
sort.Slice(unsupportedFeatures, func(i, j int) bool {
return unsupportedFeatures[i] < unsupportedFeatures[j]
})
unsupportedFeatures := sets.List(unsupportedFeatures)
for _, f := range unsupportedFeatures {
report.Extended.UnsupportedFeatures = append(report.Extended.UnsupportedFeatures, string(f))
}
Expand Down
2 changes: 1 addition & 1 deletion conformance/utils/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ func (suite *ConformanceTestSuite) Report() (*confv1.ConformanceReport, error) {
}
var succeededTrialTests []string
if len(succeededTrialTestSet) > 0 {
succeededTrialTests = succeededTrialTestSet.UnsortedList()
succeededTrialTests = sets.List(succeededTrialTestSet)
}

profileReports.compileResults(suite.extendedSupportedFeatures, suite.extendedUnsupportedFeatures)
Expand Down

0 comments on commit 8e0ad7c

Please sign in to comment.