From 8a568257d4db1ec4462ef506daa52ff398de2162 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 20 Sep 2018 12:08:09 -0700 Subject: [PATCH 1/3] just test external/external networking --- test/e2e/kubernetes/kubernetes_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/kubernetes/kubernetes_test.go b/test/e2e/kubernetes/kubernetes_test.go index 9cba791333..e2c623bca0 100644 --- a/test/e2e/kubernetes/kubernetes_test.go +++ b/test/e2e/kubernetes/kubernetes_test.go @@ -106,7 +106,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu Expect(len(nodeList.Nodes)).To(Equal(eng.NodeCount())) }) - It("should have stable external container networking", func() { + FIt("should have stable external container networking", func() { var successes int attempts := cfg.StabilityIterations for i := 0; i < attempts; i++ { @@ -141,7 +141,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu Expect(successes).To(Equal(attempts)) }) - It("should have stable internal container networking", func() { + FIt("should have stable internal container networking", func() { var successes int attempts := cfg.StabilityIterations for i := 0; i < attempts; i++ { From 16d5494d6fc9e26dccf4c3aca8a8e55878acc577 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 20 Sep 2018 13:56:57 -0700 Subject: [PATCH 2/3] focus --- test/e2e/kubernetes/kubernetes_test.go | 4 ++-- test/e2e/runner.go | 6 ++++-- test/e2e/runner/ginkgo.go | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/e2e/kubernetes/kubernetes_test.go b/test/e2e/kubernetes/kubernetes_test.go index e2c623bca0..9cba791333 100644 --- a/test/e2e/kubernetes/kubernetes_test.go +++ b/test/e2e/kubernetes/kubernetes_test.go @@ -106,7 +106,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu Expect(len(nodeList.Nodes)).To(Equal(eng.NodeCount())) }) - FIt("should have stable external container networking", func() { + It("should have stable external container networking", func() { var successes int attempts := cfg.StabilityIterations for i := 0; i < attempts; i++ { @@ -141,7 +141,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu Expect(successes).To(Equal(attempts)) }) - FIt("should have stable internal container networking", func() { + It("should have stable internal container networking", func() { var successes int attempts := cfg.StabilityIterations for i := 0; i < attempts; i++ { diff --git a/test/e2e/runner.go b/test/e2e/runner.go index 205aade0d7..2915c50bd1 100644 --- a/test/e2e/runner.go +++ b/test/e2e/runner.go @@ -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*") diff --git a/test/e2e/runner/ginkgo.go b/test/e2e/runner/ginkgo.go index 25b22b3553..cc5d62e9f5 100644 --- a/test/e2e/runner/ginkgo.go +++ b/test/e2e/runner/ginkgo.go @@ -34,7 +34,7 @@ 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) + cmd := exec.Command("ginkgo", "-slowSpecThreshold", "180", "-r", "-v", "--focus", "should have stable", testDir) util.PrintCommand(cmd) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr From d4d6b1c020ea0848dd337f0f5aaabe0dbc65f474 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 20 Sep 2018 14:23:03 -0700 Subject: [PATCH 3/3] configurable focus --- test/e2e/config/config.go | 1 + test/e2e/runner/ginkgo.go | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/e2e/config/config.go b/test/e2e/config/config.go index cae7272548..210e55651b 100644 --- a/test/e2e/config/config.go +++ b/test/e2e/config/config.go @@ -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 ( diff --git a/test/e2e/runner/ginkgo.go b/test/e2e/runner/ginkgo.go index cc5d62e9f5..22cb51c17e 100644 --- a/test/e2e/runner/ginkgo.go +++ b/test/e2e/runner/ginkgo.go @@ -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", "--focus", "should have stable", 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