diff options
author | Corey Hulen <corey@hulen.com> | 2015-09-11 11:44:54 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-09-11 11:44:54 -0700 |
commit | 1ceb6c619a629a44051b8a0ef6712f7e480e4086 (patch) | |
tree | 4d8a64604d26ccf11ad1ea5f5c7a135165231634 /web | |
parent | 471e7839966ad013ac9c61ec37d7ecdd352e87dd (diff) | |
parent | 3edb4247e96bc4e203200a4cafe42bfcf0661299 (diff) | |
download | chat-1ceb6c619a629a44051b8a0ef6712f7e480e4086.tar.gz chat-1ceb6c619a629a44051b8a0ef6712f7e480e4086.tar.bz2 chat-1ceb6c619a629a44051b8a0ef6712f7e480e4086.zip |
Merge pull request #654 from hmhealey/plt198
PLT-198 Fix unit tests on Go 1.5.1
Diffstat (limited to 'web')
-rw-r--r-- | web/web_test.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/web/web_test.go b/web/web_test.go index ff37b74d5..ccd0bba56 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) } } |