summaryrefslogtreecommitdiff
path: root/tests/plugins/jobs/helpers.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-11 11:45:24 +0300
committerValery Piashchynski <[email protected]>2021-08-11 11:45:24 +0300
commit3e2e9fbd9650c44d57a41a9dc702fe93aad2b77f (patch)
tree38f25c3c0679e8510b896d001d1b7dccf21c4bd8 /tests/plugins/jobs/helpers.go
parentd449d9d5aec1eec6d494064299feb1551f88ffe2 (diff)
Replace all 'localhost' with '127.0.0.1'. Fix default configuration and
other small bugs. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/plugins/jobs/helpers.go')
-rw-r--r--tests/plugins/jobs/helpers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/plugins/jobs/helpers.go b/tests/plugins/jobs/helpers.go
index 0d7d6ac6..831c732c 100644
--- a/tests/plugins/jobs/helpers.go
+++ b/tests/plugins/jobs/helpers.go
@@ -154,7 +154,7 @@ func enableProxy(name string, t *testing.T) {
buf := new(bytes.Buffer)
buf.WriteString(`{"enabled":true}`)
- resp, err := http.Post("http://localhost:8474/proxies/"+name, "application/json", buf) //nolint:noctx
+ resp, err := http.Post("http://127.0.0.1:8474/proxies/"+name, "application/json", buf) //nolint:noctx
require.NoError(t, err)
require.Equal(t, 200, resp.StatusCode)
if resp.Body != nil {
@@ -166,7 +166,7 @@ func disableProxy(name string, t *testing.T) {
buf := new(bytes.Buffer)
buf.WriteString(`{"enabled":false}`)
- resp, err := http.Post("http://localhost:8474/proxies/"+name, "application/json", buf) //nolint:noctx
+ resp, err := http.Post("http://127.0.0.1:8474/proxies/"+name, "application/json", buf) //nolint:noctx
require.NoError(t, err)
require.Equal(t, 200, resp.StatusCode)
if resp.Body != nil {
@@ -177,7 +177,7 @@ func disableProxy(name string, t *testing.T) {
func deleteProxy(name string, t *testing.T) {
client := &http.Client{}
- req, err := http.NewRequest(http.MethodDelete, "http://localhost:8474/proxies/"+name, nil) //nolint:noctx
+ req, err := http.NewRequest(http.MethodDelete, "http://127.0.0.1:8474/proxies/"+name, nil) //nolint:noctx
require.NoError(t, err)
resp, err := client.Do(req)