From 9b22cf31f1de925ff7905bba5b302c4f5bc08000 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 11 Sep 2015 10:18:08 -0400 Subject: [PATCH 1/2] PLT-198 Removes invalid emails from tests that require valid email addresses --- utils/textgeneration.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/textgeneration.go b/utils/textgeneration.go index 043d7bb8ae..6d353cc246 100644 --- a/utils/textgeneration.go +++ b/utils/textgeneration.go @@ -141,17 +141,14 @@ var FUZZY_STRINGS_NAMES = []string{ // Strings that should pass as acceptable emails var FUZZY_STRINGS_EMAILS = []string{ "sue@thatmightbe", - "sue@thatmightbe.", "sue@thatmightbe.c", "sue@thatmightbe.co", "su+san@thatmightbe.com", - "a@b.中国", "1@2.am", "a@b.co.uk", "a@b.cancerresearch", "su+s+an@thatmightbe.com", "per.iod@thatmightbe.com", - "per..iods@thatmightbe.com", } // Lovely giberish for all to use From 3edb4247e96bc4e203200a4cafe42bfcf0661299 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 11 Sep 2015 10:43:33 -0400 Subject: [PATCH 2/2] PLT-198 Added a small delay to one of the web tests to allow the server to get fully set up --- web/web_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/web_test.go b/web/web_test.go index ff37b74d5a..ccd0bba561 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -36,9 +36,14 @@ func TearDown() { func TestStatic(t *testing.T) { Setup() - resp, _ := http.Get(URL + "/static/images/favicon.ico") + // add a short delay to make sure the server is ready to receive requests + time.Sleep(1 * time.Second) - if resp.StatusCode != http.StatusOK { + resp, err := http.Get(URL + "/static/images/favicon.ico") + + if err != nil { + t.Fatalf("got error while trying to get static files %v", err) + } else if resp.StatusCode != http.StatusOK { t.Fatalf("couldn't get static files %v", resp.StatusCode) } }