Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
E2E - enable focused tests (#3885)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Sep 21, 2018
1 parent 6973e6d commit fa3d6d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/e2e/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type Config struct {
SoakClusterName string `envconfig:"SOAK_CLUSTER_NAME"`
ForceDeploy bool `envconfig:"FORCE_DEPLOY"`
UseDeployCommand bool `envconfig:"USE_DEPLOY_COMMAND"`
GinkgoFocus string `envconfig:"GINKGO_FOCUS"`
}

const (
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ func teardown() {
log.Printf("cannot fetch openshift metrics: %v", err)
}
}
if err := cliProvisioner.FetchActivityLog(acct, logsPath); err != nil {
log.Printf("cannot fetch the activity log: %v", err)
if !cfg.SkipLogsCollection {
if err := cliProvisioner.FetchActivityLog(acct, logsPath); err != nil {
log.Printf("cannot fetch the activity log: %v", err)
}
}
if !cfg.RetainSSH {
creds := filepath.Join(cfg.CurrentWorkingDir, "_output/", "*ssh*")
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/runner/ginkgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ func BuildGinkgoRunner(cfg *config.Config, pt *metrics.Point) (*Ginkgo, error) {
func (g *Ginkgo) Run() error {
g.Point.SetTestStart()
testDir := fmt.Sprintf("test/e2e/%s", g.Config.Orchestrator)
cmd := exec.Command("ginkgo", "-slowSpecThreshold", "180", "-r", "-v", testDir)
var cmd *exec.Cmd
if g.Config.GinkgoFocus != "" {
cmd = exec.Command("ginkgo", "-slowSpecThreshold", "180", "-r", "-v", "--focus", g.Config.GinkgoFocus, testDir)
} else {
cmd = exec.Command("ginkgo", "-slowSpecThreshold", "180", "-r", "-v", testDir)
}
util.PrintCommand(cmd)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
Expand Down

0 comments on commit fa3d6d4

Please sign in to comment.