summaryrefslogtreecommitdiff
path: root/tests/plugins/http/uploads_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/http/uploads_test.go')
-rw-r--r--tests/plugins/http/uploads_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/plugins/http/uploads_test.go b/tests/plugins/http/uploads_test.go
index df696668..54f2bead 100644
--- a/tests/plugins/http/uploads_test.go
+++ b/tests/plugins/http/uploads_test.go
@@ -31,7 +31,7 @@ func TestHandler_Upload_File(t *testing.T) {
pool, err := poolImpl.Initialize(context.Background(),
func() *exec.Cmd { return exec.Command("php", "../../http/client.php", "upload", "pipes") },
pipe.NewPipeFactory(),
- poolImpl.Config{
+ &poolImpl.Config{
NumWorkers: 1,
AllocateTimeout: time.Second * 1000,
DestroyTimeout: time.Second * 1000,
@@ -85,7 +85,7 @@ func TestHandler_Upload_File(t *testing.T) {
t.Errorf("error closing the file: error %v", err)
}
- req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, &mb)
+ req, err := http.NewRequest("POST", "http://127.0.0.1"+hs.Addr, &mb)
assert.NoError(t, err)
req.Header.Set("Content-Type", w.FormDataContentType())
@@ -114,7 +114,7 @@ func TestHandler_Upload_NestedFile(t *testing.T) {
pool, err := poolImpl.Initialize(context.Background(),
func() *exec.Cmd { return exec.Command("php", "../../http/client.php", "upload", "pipes") },
pipe.NewPipeFactory(),
- poolImpl.Config{
+ &poolImpl.Config{
NumWorkers: 1,
AllocateTimeout: time.Second * 1000,
DestroyTimeout: time.Second * 1000,
@@ -168,7 +168,7 @@ func TestHandler_Upload_NestedFile(t *testing.T) {
t.Errorf("error closing the file: error %v", err)
}
- req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, &mb)
+ req, err := http.NewRequest("POST", "http://127.0.0.1"+hs.Addr, &mb)
assert.NoError(t, err)
req.Header.Set("Content-Type", w.FormDataContentType())
@@ -197,7 +197,7 @@ func TestHandler_Upload_File_NoTmpDir(t *testing.T) {
pool, err := poolImpl.Initialize(context.Background(),
func() *exec.Cmd { return exec.Command("php", "../../http/client.php", "upload", "pipes") },
pipe.NewPipeFactory(),
- poolImpl.Config{
+ &poolImpl.Config{
NumWorkers: 1,
AllocateTimeout: time.Second * 1000,
DestroyTimeout: time.Second * 1000,
@@ -251,7 +251,7 @@ func TestHandler_Upload_File_NoTmpDir(t *testing.T) {
t.Errorf("error closing the file: error %v", err)
}
- req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, &mb)
+ req, err := http.NewRequest("POST", "http://127.0.0.1"+hs.Addr, &mb)
assert.NoError(t, err)
req.Header.Set("Content-Type", w.FormDataContentType())
@@ -280,7 +280,7 @@ func TestHandler_Upload_File_Forbids(t *testing.T) {
pool, err := poolImpl.Initialize(context.Background(),
func() *exec.Cmd { return exec.Command("php", "../../http/client.php", "upload", "pipes") },
pipe.NewPipeFactory(),
- poolImpl.Config{
+ &poolImpl.Config{
NumWorkers: 1,
AllocateTimeout: time.Second * 1000,
DestroyTimeout: time.Second * 1000,
@@ -334,7 +334,7 @@ func TestHandler_Upload_File_Forbids(t *testing.T) {
t.Errorf("error closing the file: error %v", err)
}
- req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, &mb)
+ req, err := http.NewRequest("POST", "http://127.0.0.1"+hs.Addr, &mb)
assert.NoError(t, err)
req.Header.Set("Content-Type", w.FormDataContentType())