Merge pull request #654 from hmhealey/plt198

PLT-198 Fix unit tests on Go 1.5.1
Этот коммит содержится в:
Corey Hulen
2015-09-11 11:44:54 -07:00
родитель 471e783996 3edb4247e9
Коммит 1ceb6c619a
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@@ -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)
}
}