mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
For security reason debug informations can only be exported from local server
Ref #1562
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -56,8 +56,17 @@ def test_shutdown_non_local(http_controller, web_server, config):
|
||||
def test_debug(http_controller, config, tmpdir):
|
||||
config._main_config_file = str(tmpdir / "test.conf")
|
||||
|
||||
config.set("Server", "local", True)
|
||||
response = http_controller.post('/debug')
|
||||
assert response.status == 201
|
||||
debug_dir = os.path.join(config.config_dir, "debug")
|
||||
assert os.path.exists(debug_dir)
|
||||
assert os.path.exists(os.path.join(debug_dir, "controller.txt"))
|
||||
|
||||
|
||||
def test_debug_non_local(http_controller, config, tmpdir):
|
||||
config._main_config_file = str(tmpdir / "test.conf")
|
||||
|
||||
config.set("Server", "local", False)
|
||||
response = http_controller.post('/debug')
|
||||
assert response.status == 403
|
||||
Reference in new issue
Block a user