Skip to content

vdsm integration test for recycle-bin messaging in delete_files #76

Description

@cmeans-claude-dev

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:

  • 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:

  1. 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).
  2. 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.
  3. 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.
  4. 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
  5. 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).
  • Existing 47 vdsm tests still pass.

Notes

  • This was deferred per maintainer signoff because the vdsm setup question is an unknown that PR fix(filestation): probe recycle-bin status per share #73 shouldn't block on.
  • If synoshare --setopt reliably works on vdsm DSM 7.2.2, this is a small task. If it doesn't, the API fallback may be more involved.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions