Skip to content

CBG-5764: move SafeDocumentName to testing/sgtest - #8686

Draft
torcolvin wants to merge 1 commit into
CBG-5764from
CBG-5764-safe-document-name
Draft

CBG-5764: move SafeDocumentName to testing/sgtest#8686
torcolvin wants to merge 1 commit into
CBG-5764from
CBG-5764-safe-document-name

Conversation

@torcolvin

@torcolvin torcolvin commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #8685.

SafeDocumentName existed twice, in db and in rest, and was needed from base as well - which cannot import either of them. Move it to testing/sgtest, which by design has no SG dependencies, and leave deprecated aliases in db and rest so existing call sites are untouched. Same shape as the earlier TestUseCouchbaseServer/UnitTestUrlIsWalrus moves.

The sgtest version takes testing.TB like the rest of that package; the aliases keep *testing.T.

Stack

  1. CBG-5764: keep _mou previous values describing one mutation #8685 - keep _mou previous values describing one mutation
  2. this PR - move SafeDocumentName to testing/sgtest
  3. CBG-5764: add WriteUpdateXattrOnly, an xattr-only read-modify-write #8687 - add WriteUpdateXattrOnly
  4. CBG-5764: never write a _mou whose pRev is a made-up zero #8688 - never write a _mou whose pRev is a made-up zero

🤖 Generated with Claude Code

The helper is needed from base as well as db and rest, and base cannot
import either of them. Move it to testing/sgtest, which has no SG
dependencies, and leave deprecated aliases behind so existing call sites
are untouched - the same shape as the earlier TestUseCouchbaseServer and
UnitTestUrlIsWalrus moves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant