Expose token in Share objects#427
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughIntroduced a read-only Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/actual_tests/files_sharing_test.py`:
- Line 53: The current equality assert between get_by_id.token and
new_share.token is vacuous for empty tokens; ensure the test actually exercises
a non-empty token by asserting the created share has a token before comparing.
In _test_share_fields (invoked with ShareType.TYPE_LINK) add an explicit check
like asserting new_share.token is truthy/non-empty (e.g., assert
new_share.token) and then keep the existing assert get_by_id.token ==
new_share.token to validate the round-trip from the OCS get_by_id endpoint.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f23d66ac-f847-49f0-bb79-60ab9bb91914
📒 Files selected for processing (2)
nc_py_api/files/__init__.pytests/actual_tests/files_sharing_test.py
Some use cases require passing the token to external applications that access NextCloud shares via WebDAV.
716094b to
fcfacb7
Compare
oleksandr-nc
left a comment
There was a problem hiding this comment.
Thanks for these changes!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #427 +/- ##
=======================================
Coverage 94.67% 94.67%
=======================================
Files 48 48
Lines 5633 5636 +3
=======================================
+ Hits 5333 5336 +3
Misses 300 300
🚀 New features to boost your workflow:
|
Some use cases require passing the token to external applications that access NextCloud shares via WebDAV.
Summary by CodeRabbit
New Features
Tests