From fa1a01a0e402898f01695dee702fc5eca16365b3 Mon Sep 17 00:00:00 2001 From: Louis Garman <75728+leg100@users.noreply.github.com> Date: Mon, 30 Jan 2023 16:43:14 +0000 Subject: [PATCH] Make e2e tests more reliable (#286) --- Makefile | 2 +- e2e/connect_repo_test.go | 3 +++ e2e/daemon.go | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 94ec3de44..60000f0cb 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ go-tfe-tests: build .PHONY: e2e e2e: build - go test -v ./e2e -failfast -timeout 120s -count 1 + go test -v ./e2e -failfast -timeout 600s -count 1 .PHONY: unit unit: diff --git a/e2e/connect_repo_test.go b/e2e/connect_repo_test.go index 48ca3b7c2..543506611 100644 --- a/e2e/connect_repo_test.go +++ b/e2e/connect_repo_test.go @@ -146,8 +146,10 @@ func TestConnectRepo(t *testing.T) { matchText(t, ".flash-success", "disconnected workspace from repo"), // go to workspace settings chromedp.Click(`//a[text()='settings']`, chromedp.NodeVisible), + screenshot(t), // delete workspace chromedp.Click(`//button[text()='Delete workspace']`, chromedp.NodeVisible), + screenshot(t), // confirm deletion matchText(t, ".flash-success", "deleted workspace: "+workspaceName), // @@ -155,6 +157,7 @@ func TestConnectRepo(t *testing.T) { // // go to org chromedp.Navigate(path.Join(url, "organizations", org)), + screenshot(t), // go to vcs providers chromedp.Click("#vcs_providers > a", chromedp.NodeVisible), screenshot(t), diff --git a/e2e/daemon.go b/e2e/daemon.go index a6ec326ca..3013334e2 100644 --- a/e2e/daemon.go +++ b/e2e/daemon.go @@ -67,6 +67,7 @@ func (d *daemon) start(t *testing.T) string { "--cert-file", "./fixtures/cert.crt", "--key-file", "./fixtures/key.pem", "--dev-mode=false", + "--plugin-cache", // speed up tests by caching providers "--database", database, )