Skip to content

Commit ff47d29

Browse files
committed
Set testsStarted=true for monitortests
This is to avoid panic caused by `!testsStarted` [1]. [1]. https://github.com/openshift/origin/blob/9307bba172b88036ba0e7eb49a0e2e92947254f9/test/extended/util/test_setup.go#L100-L111
1 parent 6fcacab commit ff47d29

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cmd/openshift-tests/monitor/run/run_monitor_command.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/openshift/origin/pkg/clioptions/imagesetup"
1515
"github.com/openshift/origin/pkg/monitortestframework"
16+
exutil "github.com/openshift/origin/test/extended/util"
1617

1718
"github.com/openshift/origin/pkg/monitor/monitorapi"
1819
"github.com/openshift/origin/test/extended/util/image"
@@ -92,6 +93,9 @@ func (f *RunMonitorFlags) BindFlags(flags *pflag.FlagSet) {
9293
}
9394

9495
func (f *RunMonitorFlags) ToOptions() (*RunMonitorOptions, error) {
96+
// This is to set testsStarted = true to avoid panic
97+
exutil.WithCleanup(func() {})
98+
9599
var displayFilterFn monitorapi.EventIntervalMatchesFunc
96100
if f.DisplayFromNow {
97101
now := time.Now()

0 commit comments

Comments
 (0)