You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surfaced as F2 on PR #73 (#37 fix) — one of two ACs from #37 that's deferred to a follow-up. Filing now so "Closes #37" on PR #73 is honest about scope.
#37's AC #5 was "Integration test against vdsm verifying real DSM recycle-bin state matches." PR #73 ships unit tests covering the lazy-probe paths (success/408/105/other-error/memoization), self-correct on observation, and the on-reauth callback dispatch — but no vdsm integration test, because:
DSM 7.2.x's synoshare --setopt reliability is unproven for the recycle-bin toggle. PR Fix all 5 remaining vdsm test failures (42/47 → 47/47) #23 reverted a similar synoshare --setopt call for share creation because the subcommand was rejected on the vdsm DSM 7.2.2 image. The recycle-bin-toggle subcommand may have the same problem.
Without a reliable way to set up "share with #recycle enabled" + "share with #recycle disabled" on the vdsm fixture, the integration test can't assert end-to-end behavior.
Scope
Verify the vdsm setup path, then write the test:
Probe synoshare on vdsm DSM 7.2.2: ssh admin@vdsm 'sudo synoshare --setopt <name> recycle_bin=on' and recycle_bin=off. Confirm: (a) the subcommand exists; (b) the option name is correct (recycle_bin vs enable_recycle_bin vs whatever DSM 7.2.x calls it); (c) the toggle takes effect (verified by listing /<share>/#recycle via FileStation API afterward).
If synoshare --setopt works: extend tests/vdsm/setup_dsm.py to create two test shares — one with recycle on (testshare_with_recycle), one with recycle off (testshare_without_recycle). Bake into the golden image.
If synoshare --setopt fails: try the DSM web API as a fallback (SYNO.Core.Share set with enable_recycle_bin flag). Document whichever approach works.
Write the integration test in tests/test_integration.py::TestDelete:
Upload a sentinel file to each share
Call delete_files on each
Assert the response message correctly distinguishes "Recycle bin is enabled" vs "NOT enabled"
Assert that on the recycle-on share, the file actually shows up under /<share>/#recycle/ after the delete
Document any vdsm-specific quirks in docs/specs/filestation-module-spec.md if the vdsm path differs from a real NAS (e.g. requires DSM admin SSH for setup).
Acceptance criteria
vdsm fixture creates two shares with known #recycle states (one on, one off).
Integration test in tests/test_integration.py (marked vdsm) asserts delete_files produces correct messaging for both shares.
Integration test runs in the existing vdsm integration tests workflow without requiring infrastructure changes.
CHANGELOG entry under ### Added (test coverage is added, no behavior change).
Summary
Surfaced as F2 on PR #73 (#37 fix) — one of two ACs from #37 that's deferred to a follow-up. Filing now so "Closes #37" on PR #73 is honest about scope.
#37's AC #5 was "Integration test against vdsm verifying real DSM recycle-bin state matches." PR #73 ships unit tests covering the lazy-probe paths (success/408/105/other-error/memoization), self-correct on observation, and the on-reauth callback dispatch — but no vdsm integration test, because:
synoshare --setoptreliability is unproven for the recycle-bin toggle. PR Fix all 5 remaining vdsm test failures (42/47 → 47/47) #23 reverted a similarsynoshare --setoptcall for share creation because the subcommand was rejected on the vdsm DSM 7.2.2 image. The recycle-bin-toggle subcommand may have the same problem.#recycleenabled" + "share with#recycledisabled" on the vdsm fixture, the integration test can't assert end-to-end behavior.Scope
Verify the vdsm setup path, then write the test:
ssh admin@vdsm 'sudo synoshare --setopt <name> recycle_bin=on'andrecycle_bin=off. Confirm: (a) the subcommand exists; (b) the option name is correct (recycle_binvsenable_recycle_binvs whatever DSM 7.2.x calls it); (c) the toggle takes effect (verified by listing/<share>/#recyclevia FileStation API afterward).synoshare --setoptworks: extendtests/vdsm/setup_dsm.pyto create two test shares — one with recycle on (testshare_with_recycle), one with recycle off (testshare_without_recycle). Bake into the golden image.synoshare --setoptfails: try the DSM web API as a fallback (SYNO.Core.Shareset withenable_recycle_binflag). Document whichever approach works.tests/test_integration.py::TestDelete:delete_fileson each/<share>/#recycle/after the deletedocs/specs/filestation-module-spec.mdif the vdsm path differs from a real NAS (e.g. requires DSM admin SSH for setup).Acceptance criteria
#recyclestates (one on, one off).tests/test_integration.py(markedvdsm) assertsdelete_filesproduces correct messaging for both shares.vdsm integration testsworkflow without requiring infrastructure changes.### Added(test coverage is added, no behavior change).Notes
synoshare --setoptreliably works on vdsm DSM 7.2.2, this is a small task. If it doesn't, the API fallback may be more involved.References
synoshare --setoptfor share creation), PR fix(vdsm): refresh DSM search index after creating test data #67 (search index refresh)src/mcp_synology/modules/filestation/operations.py:386-410(delete_files messaging),tests/vdsm/setup_dsm.py,tests/test_integration.py