mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
If listen on all interface do not return localhost as console
Fix https://github.com/GNS3/gns3-gui/issues/1574
This commit is contained in:
3 files changed
+19
-3
No files matched your search
@@ -43,9 +43,17 @@ def test_init(compute):
|
||||
def test_getUrl(controller):
|
||||
compute = Compute("my_compute_id", protocol="https", host="localhost", port=84, controller=controller)
|
||||
assert compute._getUrl("/test") == "https://localhost:84/v2/compute/test"
|
||||
# IPV6 localhost
|
||||
compute = Compute("my_compute_id", protocol="https", host="::1", port=84, controller=controller)
|
||||
assert compute._getUrl("/test") == "https://[::1]:84/v2/compute/test"
|
||||
|
||||
# Listen on all interfaces aka 0.0.0.0 require us to connect via 127.0.0.1
|
||||
compute = Compute("my_compute_id", protocol="https", host="0.0.0.0", port=84, controller=controller)
|
||||
assert compute._getUrl("/test") == "https://127.0.0.1:84/v2/compute/test"
|
||||
# IPV6
|
||||
compute = Compute("my_compute_id", protocol="https", host="::", port=84, controller=controller)
|
||||
assert compute._getUrl("/test") == "https://[::1]:84/v2/compute/test"
|
||||
|
||||
|
||||
def test_host_ip(controller):
|
||||
compute = Compute("my_compute_id", protocol="https", host="localhost", port=84, controller=controller)
|
||||
|
||||
Reference in new issue
Block a user