From 8c3a2e817be8a365abf167893e1d73ae79382cb6 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Tue, 12 Sep 2017 13:54:45 +0300 Subject: [PATCH] Add missing fixture to clean gpg_key table (#2494) * Add missing fixture to clean gpg_key table * Fix possible too fast request execution in timetracker start/stop test --- integrations/timetracking_test.go | 4 ++++ models/fixtures/gpg_key.yml | 1 + 2 files changed, 5 insertions(+) create mode 100644 models/fixtures/gpg_key.yml diff --git a/integrations/timetracking_test.go b/integrations/timetracking_test.go index e92cb95a89..534bb4d613 100644 --- a/integrations/timetracking_test.go +++ b/integrations/timetracking_test.go @@ -8,6 +8,7 @@ import ( "net/http" "path" "testing" + "time" "github.com/stretchr/testify/assert" ) @@ -56,6 +57,9 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo htmlDoc.AssertElement(t, ".timetrack .stop-cancel .stop", true) htmlDoc.AssertElement(t, ".timetrack .stop-cancel .cancel", true) + // Sleep for 1 second to not get wrong order for stopping timer + time.Sleep(time.Second) + req = NewRequestWithValues(t, "POST", path.Join(user, repo, "issues", issue, "times", "stopwatch", "toggle"), map[string]string{ "_csrf": htmlDoc.GetCSRF(), }) diff --git a/models/fixtures/gpg_key.yml b/models/fixtures/gpg_key.yml new file mode 100644 index 0000000000..ca780a73aa --- /dev/null +++ b/models/fixtures/gpg_key.yml @@ -0,0 +1 @@ +[] # empty