Merge pull request #654 from hmhealey/plt198
PLT-198 Fix unit tests on Go 1.5.1
Этот коммит содержится в:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user