Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO-JIRA: Fix issue 28445 #28446

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions pkg/test/ginkgo/cmd_runsuite.go
Expand Up @@ -197,17 +197,6 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, junitSuiteName string, mon

fmt.Fprintf(o.Out, "found %d filtered tests\n", len(tests))

restConfig, err := clusterinfo.GetMonitorRESTConfig()
if err != nil {
return err
}

// skip tests due to newer k8s
tests, err = o.filterOutRebaseTests(restConfig, tests)
if err != nil {
return err
}

count := o.Count
if count == 0 {
count = suite.Count
Expand Down Expand Up @@ -239,6 +228,17 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, junitSuiteName string, mon
return nil
}

restConfig, err := clusterinfo.GetMonitorRESTConfig()
if err != nil {
return err
}

// skip tests due to newer k8s
tests, err = o.filterOutRebaseTests(restConfig, tests)
if err != nil {
return err
}

if len(o.JUnitDir) > 0 {
if _, err := os.Stat(o.JUnitDir); err != nil {
if !os.IsNotExist(err) {
Expand Down