Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/openshift-tests/openshift-tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
collectdiskcertificates "github.com/openshift/origin/pkg/cmd/openshift-tests/collect-disk-certificates"
"github.com/openshift/origin/pkg/cmd/openshift-tests/dev"
"github.com/openshift/origin/pkg/cmd/openshift-tests/disruption"
e2e_analysis "github.com/openshift/origin/pkg/cmd/openshift-tests/e2e-analysis"
"github.com/openshift/origin/pkg/cmd/openshift-tests/images"
"github.com/openshift/origin/pkg/cmd/openshift-tests/list"
"github.com/openshift/origin/pkg/cmd/openshift-tests/monitor"
Expand Down Expand Up @@ -100,6 +101,7 @@ func main() {
monitor.NewMonitorCommand(ioStreams),
disruption.NewDisruptionCommand(ioStreams),
risk_analysis.NewTestFailureRiskAnalysisCommand(),
e2e_analysis.NewTestFailureClusterAnalysisCheckCommand(),
run_resource_watch.NewRunResourceWatchCommand(),
timeline.NewTimelineCommand(ioStreams),
run_disruption.NewRunInClusterDisruptionMonitorCommand(ioStreams),
Expand Down
31 changes: 31 additions & 0 deletions pkg/cmd/openshift-tests/e2e-analysis/command.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package e2e_analysis

import (
e2eanalysis "github.com/openshift/origin/pkg/e2eanalysis"
"github.com/spf13/cobra"
"k8s.io/kubectl/pkg/util/templates"
)

func NewTestFailureClusterAnalysisCheckCommand() *cobra.Command {
e2eAnalysisOpts := &e2eanalysis.Options{}

cmd := &cobra.Command{
Use: "e2e-analysis",
Short: "Performs analysis against the cluster",
Long: templates.LongDesc(`
Check cluster health and run some e2e analyisis, including:
all machines should be in Running state;
all nodes should be ready;
ready node count should match or exceed running machine count;
operators health ordered by dependency;
and so on.`),
RunE: func(cmd *cobra.Command, args []string) error {
return e2eAnalysisOpts.Run()
},
}
cmd.Flags().StringVar(&e2eAnalysisOpts.JUnitDir,
"junit-dir", e2eAnalysisOpts.JUnitDir,
"The directory where test reports were written in junit xml format.")

return cmd
}
Loading