Repository navigation
test(hub): stabilize share expiration fixture - #306
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review found no active issues, and the test-only change deterministically fixes the fixture without altering production behavior or existing assertions.
No open issues 🎉
What changed in this PR
This test-only Hub change makes the share-link expiration repository fixture deterministic by removing its dependence on the wall clock while preserving the existing expiration constraint and stale-update behavior.
Changes:
- Sets an explicit share-link creation timestamp.
- Derives original, shortened, and stale expirations from that timestamp.
- Keeps production behavior and assertions unchanged.
| File | Description |
|---|---|
| hub/server/repositories/public-sharing/update-share-link-expirations/index.db.test.ts | Stabilizes the share-link expiration fixture by explicitly setting its creation time and deriving deterministic expiration timestamps. |
Review effort: Lite (adaptive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The share-link expiration repository test depended on the wall clock. Its shortened expiration eventually became earlier than the row creation time, so PostgreSQL correctly rejected the update under the existing expiration constraint.
What changes
The fixture now sets an explicit creation time and derives its original, shortened, and stale expirations from that time. The production constraint and the stale-update assertion remain unchanged.