Fix localtest for HttpPoster

This commit is contained in:
DanB
2015-10-02 18:20:52 +02:00
parent 2e61fcf5bb
commit b78918fc87

View File

@@ -40,7 +40,7 @@ func TestHttpJsonPoster(t *testing.T) {
}
content := &TestContent{Var1: "Val1", Var2: "Val2"}
filePath := "/tmp/cgr_test_http_poster.json"
if _, err := HttpPoster("http://localhost:8080/invalid", true, content, true, 3, filePath); err != nil {
if _, err := HttpPoster("http://localhost:8080/invalid", true, content, CONTENT_JSON, 3, filePath); err != nil {
t.Error(err)
}
jsnContent, _ := json.Marshal(content)
@@ -62,7 +62,7 @@ func TestHttpBytesPoster(t *testing.T) {
Test2
`)
filePath := "/tmp/test_http_poster.http"
if _, err := HttpPoster("http://localhost:8080/invalid", true, content, false, 3, filePath); err != nil {
if _, err := HttpPoster("http://localhost:8080/invalid", true, content, CONTENT_TEXT, 3, filePath); err != nil {
t.Error(err)
}
if readBytes, err := ioutil.ReadFile(filePath); err != nil {