From 76e3c78ff0371c6fc0b973320b4f7b8b14d842e8 Mon Sep 17 00:00:00 2001 From: tcely Date: Mon, 17 Feb 2025 05:53:32 -0500 Subject: [PATCH 1/4] Ensure the directory exists for testing --- tubesync/sync/tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tubesync/sync/tests.py b/tubesync/sync/tests.py index 1c99e82b..9a40096c 100644 --- a/tubesync/sync/tests.py +++ b/tubesync/sync/tests.py @@ -212,6 +212,8 @@ class FrontEndTestCase(TestCase): task = Task.objects.get_task('sync.tasks.index_source_task', args=(source_uuid,))[0] self.assertEqual(task.queue, source_uuid) + # Run the check_source_directory_exists task + check_source_directory_exists.now(source_uuid) # Check the source is now on the source overview page response = c.get('/sources') self.assertEqual(response.status_code, 200) From eb6c78a0e40110b8d932f3aae744ed64332690a8 Mon Sep 17 00:00:00 2001 From: tcely Date: Mon, 17 Feb 2025 05:59:20 -0500 Subject: [PATCH 2/4] Update .dockerignore --- .dockerignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5322b2db..4c4902f5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,5 +4,5 @@ .gitattributes README.md tubesync/media -tubesync/downloads -db.sqlite3 \ No newline at end of file +tubesync/tubesync/downloads +db.sqlite3 From 573df058678427013c2d5f6bb53e0c64adc7fcd5 Mon Sep 17 00:00:00 2001 From: tcely Date: Mon, 17 Feb 2025 06:02:23 -0500 Subject: [PATCH 3/4] Update .gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cf63cfba..17e61eba 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,7 @@ db.sqlite3 db.sqlite3-journal /tubesync/static/ /tubesync/media/ -/tubesync/downloads/ +/tubesync/tubesync/downloads/ # Flask stuff: instance/ @@ -136,4 +136,4 @@ Pipfile.lock .vscode/launch.json # Ignore Jetbrains IDE files -.idea/ \ No newline at end of file +.idea/ From 1e5f295d282f932707928260e06c9d27236716bd Mon Sep 17 00:00:00 2001 From: tcely Date: Mon, 17 Feb 2025 06:08:38 -0500 Subject: [PATCH 4/4] fixup: import the `check_source_directory_exists` task --- tubesync/sync/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubesync/sync/tests.py b/tubesync/sync/tests.py index 9a40096c..0646a937 100644 --- a/tubesync/sync/tests.py +++ b/tubesync/sync/tests.py @@ -16,7 +16,7 @@ from django.test import TestCase, Client, override_settings from django.utils import timezone from background_task.models import Task from .models import Source, Media -from .tasks import cleanup_old_media +from .tasks import cleanup_old_media, check_source_directory_exists from .filtering import filter_media from .utils import filter_response from .choices import (Val, Fallback, IndexSchedule, SourceResolution,