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

E2E - enable focused tests #3885

Merged
merged 3 commits into from
Sep 21, 2018
Merged
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
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 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow this got missed when the SkipLogsCollection config option was added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus bug fix.

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