Skip to content

Commit c0324c9

Browse files
committed
Rename
1 parent 2a40cb6 commit c0324c9

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

tools/flakeguard/cmd/generate_test_report.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/spf13/cobra"
1414
)
1515

16-
var AggregateResultsCmd = &cobra.Command{
16+
var GenerateTestReportCmd = &cobra.Command{
1717
Use: "generate-test-report",
1818
Short: "Generate test report based on test results",
1919
Run: func(cmd *cobra.Command, args []string) {
@@ -176,22 +176,22 @@ var AggregateResultsCmd = &cobra.Command{
176176
}
177177

178178
func init() {
179-
AggregateResultsCmd.Flags().StringP("test-results-dir", "p", "", "Path to the folder containing JSON test result files (required)")
180-
AggregateResultsCmd.Flags().StringP("project-path", "r", ".", "The path to the Go project. Default is the current directory. Useful for subprojects")
181-
AggregateResultsCmd.Flags().StringP("output-path", "o", "./report", "Path to output the aggregated results (directory)")
182-
AggregateResultsCmd.Flags().Float64P("max-pass-ratio", "", 1.0, "The maximum pass ratio threshold for a test to be considered flaky")
183-
AggregateResultsCmd.Flags().StringP("codeowners-path", "", "", "Path to the CODEOWNERS file")
184-
AggregateResultsCmd.Flags().StringP("repo-path", "", ".", "The path to the root of the repository/project")
185-
AggregateResultsCmd.Flags().String("repo-url", "", "The repository URL")
186-
AggregateResultsCmd.Flags().String("branch-name", "", "Branch name for the test report")
187-
AggregateResultsCmd.Flags().String("head-sha", "", "Head commit SHA for the test report")
188-
AggregateResultsCmd.Flags().String("base-sha", "", "Base commit SHA for the test report")
189-
AggregateResultsCmd.Flags().String("github-workflow-name", "", "GitHub workflow name for the test report")
190-
AggregateResultsCmd.Flags().String("github-workflow-run-url", "", "GitHub workflow run URL for the test report")
191-
AggregateResultsCmd.Flags().String("report-id", "", "Optional identifier for the test report. Will be generated if not provided")
192-
AggregateResultsCmd.Flags().Bool("race", false, "Enable the race detector")
193-
194-
if err := AggregateResultsCmd.MarkFlagRequired("test-results-dir"); err != nil {
179+
GenerateTestReportCmd.Flags().StringP("test-results-dir", "p", "", "Path to the folder containing JSON test result files (required)")
180+
GenerateTestReportCmd.Flags().StringP("project-path", "r", ".", "The path to the Go project. Default is the current directory. Useful for subprojects")
181+
GenerateTestReportCmd.Flags().StringP("output-path", "o", "./report", "Path to output the aggregated results (directory)")
182+
GenerateTestReportCmd.Flags().Float64P("max-pass-ratio", "", 1.0, "The maximum pass ratio threshold for a test to be considered flaky")
183+
GenerateTestReportCmd.Flags().StringP("codeowners-path", "", "", "Path to the CODEOWNERS file")
184+
GenerateTestReportCmd.Flags().StringP("repo-path", "", ".", "The path to the root of the repository/project")
185+
GenerateTestReportCmd.Flags().String("repo-url", "", "The repository URL")
186+
GenerateTestReportCmd.Flags().String("branch-name", "", "Branch name for the test report")
187+
GenerateTestReportCmd.Flags().String("head-sha", "", "Head commit SHA for the test report")
188+
GenerateTestReportCmd.Flags().String("base-sha", "", "Base commit SHA for the test report")
189+
GenerateTestReportCmd.Flags().String("github-workflow-name", "", "GitHub workflow name for the test report")
190+
GenerateTestReportCmd.Flags().String("github-workflow-run-url", "", "GitHub workflow run URL for the test report")
191+
GenerateTestReportCmd.Flags().String("report-id", "", "Optional identifier for the test report. Will be generated if not provided")
192+
GenerateTestReportCmd.Flags().Bool("race", false, "Enable the race detector")
193+
194+
if err := GenerateTestReportCmd.MarkFlagRequired("test-results-dir"); err != nil {
195195
log.Fatal().Err(err).Msg("Error marking flag as required")
196196
}
197197
}

tools/flakeguard/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func init() {
3939
rootCmd.AddCommand(cmd.FindTestsCmd)
4040
rootCmd.AddCommand(cmd.RunTestsCmd)
4141
rootCmd.AddCommand(cmd.CheckTestOwnersCmd)
42-
rootCmd.AddCommand(cmd.AggregateResultsCmd)
42+
rootCmd.AddCommand(cmd.GenerateTestReportCmd)
4343
rootCmd.AddCommand(cmd.GenerateReportCmd)
4444
rootCmd.AddCommand(cmd.GetGHArtifactLinkCmd)
4545
rootCmd.AddCommand(cmd.SendToSplunkCmd)

0 commit comments

Comments
 (0)