test(npm): npm hosted step 20, part 3 of 3 — unpublish atomicity + counter tests

Part 3 of 3 of the npm hosted planStep 20: whole-package unpublish + inline cascade.

🗂️ Stacked MRs

Split into 3 stacked MRs to keep each within the review size limit (~600 ideal reviewable LoC). Each part targets the previous one (part 1 → main); review and merge bottom-up.

🧪 What this part adds

Completes the whole-package unpublish integration coverage with the atomicity, cascade-correctness, timing, and repository-counter tests, plus the counter-only fixture helpers.

Spec coverage

Acceptance criterion / case Test
Atomicity — rollback mid-cascade leaves package, versions, files, tags, metadata all unchanged TestUnpublishPackageIntegration_Atomicity
AC 59 — npm_tags cascade (hard-delete) TestUnpublishPackageIntegration_TagsCascaded
AC 59 — npm_files cascade (soft-delete) TestUnpublishPackageIntegration_FilesCascaded
Timing — 5000-version commit within bound (< 30 s) TestUnpublishPackageIntegration_LargePackage_CommitsWithinBound
Counters — artifacts_count / size_bytes decrement + GREATEST(...,0) clamp TestUnpublishPackageIntegration_RepositoryCountersDecremented

📚 References

Related to #138 (closed)

Edited by David Fernandez

Merge request reports

Loading
Loading