From 8fc7796da01802cf6d8f9a17f92c8413b4d76e30 Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Thu, 21 Dec 2023 08:48:29 +0000 Subject: [PATCH] test(ssh): remove root key --- tests/test_graphql/test_ssh.py | 4 +--- tests/test_rest_endpoints/services/test_ssh.py | 17 ----------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/tests/test_graphql/test_ssh.py b/tests/test_graphql/test_ssh.py index 752f808..b16bf4c 100644 --- a/tests/test_graphql/test_ssh.py +++ b/tests/test_graphql/test_ssh.py @@ -522,9 +522,7 @@ def test_graphql_remove_ssh_key(authorized_client, some_users, mock_subprocess_p assert response.json()["data"]["users"]["removeSshKey"]["user"]["sshKeys"] == [] -def test_graphql_remove_root_ssh_key( - authorized_client, some_users, mock_subprocess_popen -): +def test_graphql_remove_root_ssh_key(authorized_client, some_users): response = authorized_client.post( "/graphql", json={ diff --git a/tests/test_rest_endpoints/services/test_ssh.py b/tests/test_rest_endpoints/services/test_ssh.py index 973adb6..9eaaf17 100644 --- a/tests/test_rest_endpoints/services/test_ssh.py +++ b/tests/test_rest_endpoints/services/test_ssh.py @@ -95,23 +95,6 @@ def some_users(mocker, datadir): ## /ssh/keys/{user} ###################################################### -def test_delete_root_key(authorized_client, root_and_admin_have_keys): - response = authorized_client.delete( - "/services/ssh/keys/root", json={"public_key": "ssh-ed25519 KEY test@pc"} - ) - assert response.status_code == 200 - assert ( - "rootKeys" - not in read_json(root_and_admin_have_keys / "root_and_admin_have_keys.json")[ - "ssh" - ] - or read_json(root_and_admin_have_keys / "root_and_admin_have_keys.json")["ssh"][ - "rootKeys" - ] - == [] - ) - - def test_delete_root_nonexistent_key(authorized_client, root_and_admin_have_keys): response = authorized_client.delete( "/services/ssh/keys/root", json={"public_key": "ssh-rsa KEY test@pc"}