From 4c7f01278563b6452578360e689bfc8617bc6ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Mon, 12 Aug 2024 08:06:13 +0000 Subject: [PATCH 1/2] Remove unused shared dirs --- src/MCPServer/lib/server/shared_dirs.py | 7 ------- .../src/components/administration/views.py | 14 -------------- .../components/administration/test_usage.py | 2 +- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/MCPServer/lib/server/shared_dirs.py b/src/MCPServer/lib/server/shared_dirs.py index ffbb365203..d359bafedb 100644 --- a/src/MCPServer/lib/server/shared_dirs.py +++ b/src/MCPServer/lib/server/shared_dirs.py @@ -16,17 +16,10 @@ def create(): "completed", "completed/transfers", "currentlyProcessing", - "DIPbackups", "failed", "rejected", "sharedMicroServiceTasksConfigs", - "sharedMicroServiceTasksConfigs/createXmlEventsAssist", - "sharedMicroServiceTasksConfigs/generateAIP", - "sharedMicroServiceTasksConfigs/generateAIP/bagit", "sharedMicroServiceTasksConfigs/processingMCPConfigs", - "sharedMicroServiceTasksConfigs/transcoder", - "sharedMicroServiceTasksConfigs/transcoder/defaultIcons", - "SIPbackups", "tmp", "watchedDirectories", "watchedDirectories/activeTransfers", diff --git a/src/dashboard/src/components/administration/views.py b/src/dashboard/src/components/administration/views.py index 4346140895..e5918f6c1d 100644 --- a/src/dashboard/src/components/administration/views.py +++ b/src/dashboard/src/components/administration/views.py @@ -280,13 +280,6 @@ def _get_shared_dirs(calculate_usage=False): "path": os.path.join(shared_path, "completed", "transfers"), }, ), - ( - "dip_backups", - { - "description": "DIP backups", - "path": os.path.join(shared_path, "DIPbackups"), - }, - ), ( "failed", {"description": "Failed", "path": os.path.join(shared_path, "failed")}, @@ -298,13 +291,6 @@ def _get_shared_dirs(calculate_usage=False): "path": os.path.join(shared_path, "rejected"), }, ), - ( - "sip_backups", - { - "description": "SIP backups", - "path": os.path.join(shared_path, "SIPbackups"), - }, - ), ( "tmp", { diff --git a/tests/dashboard/components/administration/test_usage.py b/tests/dashboard/components/administration/test_usage.py index 1123acfa3c..86ad98922e 100644 --- a/tests/dashboard/components/administration/test_usage.py +++ b/tests/dashboard/components/administration/test_usage.py @@ -53,7 +53,7 @@ def test_calculation(self, mock_mount_path, mock_dir_size, mock_dir_used): mock_dir_size.assert_called_with("/") self.assertEqual(mock_mount_path.call_count, 5) self.assertEqual(mock_dir_size.call_count, 5) - self.assertEqual(mock_dir_used.call_count, 45) + self.assertEqual(mock_dir_used.call_count, 35) @mock.patch( "subprocess.check_output", From 4f2f9c4e159191c787782e45e898633e066e4526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Mon, 12 Aug 2024 08:27:09 +0000 Subject: [PATCH 2/2] Remove unused pytest config --- pytest.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index d942e440c0..d185389b61 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,4 @@ [pytest] addopts = --reuse-db -p no:cacheprovider -django_find_projects=false DJANGO_SETTINGS_MODULE=settings.test norecursedirs = .svn _build tmp* node_modules bower_components share .tox