Skip to content

Commit

Permalink
Merge pull request #2193 from mlavacca/conformance-profiles-flag-fix
Browse files Browse the repository at this point in the history
conformance-profiles CLI fixes
  • Loading branch information
k8s-ci-robot authored Jul 17, 2023
2 parents 7ded956 + e9e3e13 commit 3b33a84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conformance/experimental_conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestExperimentalConformance(t *testing.T) {
namespaceLabels = suite.ParseNamespaceLabels(*flags.NamespaceLabels)

// experimental conformance flags
conformanceProfiles := suite.ParseConformanceProfiles(*flags.ConformanceProfiles)
conformanceProfiles = suite.ParseConformanceProfiles(*flags.ConformanceProfiles)

if conformanceProfiles.Len() > 0 {
// if some conformance profiles have been set, run the experimental conformance suite...
Expand Down Expand Up @@ -131,10 +131,10 @@ func testExperimentalConformance(t *testing.T) {
if err != nil {
t.Fatalf("error generating conformance profile report: %v", err)
}
writeReport(t.Log, *report, *flags.ReportOutput)
writeReport(t.Logf, *report, *flags.ReportOutput)
}

func writeReport(log func(...any), report confv1a1.ConformanceReport, output string) error {
func writeReport(logf func(string, ...any), report confv1a1.ConformanceReport, output string) error {
rawReport, err := yaml.Marshal(report)
if err != nil {
return err
Expand All @@ -145,7 +145,7 @@ func writeReport(log func(...any), report confv1a1.ConformanceReport, output str
return err
}
}
log("Conformance report:\n %s", rawReport)
logf("Conformance report:\n %s", string(rawReport))

return nil
}

0 comments on commit 3b33a84

Please sign in to comment.