Skip to content

Add behavioral sync test suite and fix ETag-fallback conflict bug#149

Merged
D-VR merged 1 commit into
masterfrom
add-behavioral-fixtures
Jun 30, 2026
Merged

Add behavioral sync test suite and fix ETag-fallback conflict bug#149
D-VR merged 1 commit into
masterfrom
add-behavioral-fixtures

Conversation

@D-VR

@D-VR D-VR commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Adds a behavioral test suite for the sync pipeline and fixes a conflict-detection bug surfaced while writing it.

Tests

  • HTTP fixture harness (FakeSession/FakeResponse) with route registration, call counting, and a guard that fails on unexpected requests.
  • Fixture- and snapshot-driven coverage of the main modules: nested folders, Opencast LTI single/series, Sciebo PROPFIND caching, skip rules, and a mixed-module course; plus course/semester filtering and storage safety.
  • download_file behavior tests: chunked-to-disk download, in-run path dedup, and every update_files_conflict mode (keep/none/overwrite/rename + unknown->rename).
  • assert_snapshot helper with SMM_UPDATE_SNAPSHOTS=1 to regenerate snapshots.
  • Converted test_course_prefix_handling from unittest to pytest style for consistency.

Fix

  • download_file: a failed local-vs-cache ETag comparison no longer silently overwrites the local file. A faulty/unreadable ETag cache is now treated as if no cached ETag existed, falling back to the timestamp/HEAD heuristic to decide whether the local copy was modified.

Closes #73

@D-VR D-VR merged commit c4f355f into master Jun 30, 2026
4 checks passed
@D-VR D-VR deleted the add-behavioral-fixtures branch June 30, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up CI/CD

1 participant