Change default API URL from localhost to 127.0.0.1 (#153)

* Change host from localhost to 127.0.0.1

* change unit tests to also use 127.0.0.1 instead of localhost
This commit is contained in:
Seif Lotfy سيف لطفي
2016-10-13 00:00:53 +02:00
committed by C Cirello
parent 1ff480561a
commit 006c01c97e
4 changed files with 13 additions and 13 deletions

View File

@@ -169,15 +169,15 @@ func TestTasksrvURL(t *testing.T) {
tests := []struct {
port, in, out string
}{
{"8080", "//localhost", "http://localhost:8080/tasks"},
{"8080", "//localhost/", "http://localhost:8080/tasks"},
{"8080", "//localhost:8081", "http://localhost:8081/tasks"},
{"8080", "//localhost:8081/", "http://localhost:8081/tasks"},
{"8080", "http://localhost", "http://localhost:8080/tasks"},
{"8080", "http://localhost/", "http://localhost:8080/tasks"},
{"8080", "http://localhost:8081", "http://localhost:8081/tasks"},
{"8080", "http://localhost:8081/", "http://localhost:8081/tasks"},
{"8080", "http://localhost:8081/endpoint", "http://localhost:8081/endpoint"},
{"8080", "//127.0.0.1", "http://127.0.0.1:8080/tasks"},
{"8080", "//127.0.0.1/", "http://127.0.0.1:8080/tasks"},
{"8080", "//127.0.0.1:8081", "http://127.0.0.1:8081/tasks"},
{"8080", "//127.0.0.1:8081/", "http://127.0.0.1:8081/tasks"},
{"8080", "http://127.0.0.1", "http://127.0.0.1:8080/tasks"},
{"8080", "http://127.0.0.1/", "http://127.0.0.1:8080/tasks"},
{"8080", "http://127.0.0.1:8081", "http://127.0.0.1:8081/tasks"},
{"8080", "http://127.0.0.1:8081/", "http://127.0.0.1:8081/tasks"},
{"8080", "http://127.0.0.1:8081/endpoint", "http://127.0.0.1:8081/endpoint"},
}
for _, tt := range tests {