Repository navigation
Closed
Description
Overview
Establish a testing strategy using Zenodo sandbox to validate DOI workflows without polluting production Zenodo.
Background
- Zenodo production token: stored in
ZENODO_API_KEY - Zenodo sandbox token: stored in
ZENODO_SANDBOX_API_KEY - Existing test infrastructure:
test/zenodo-sandbox.test.ts - Backend already supports
sandbox: trueparameter in all Zenodo operations
Requirements
1. Test Environment Configuration
- All Zenodo tests should default to sandbox
- Production Zenodo should only be used when explicitly opted-in
- CI/CD should run sandbox tests on every PR
- Document when to use sandbox vs production
2. Test Coverage
- Concept DOI creation (admin-only)
- Version DOI publishing via webhook
- DOI metadata updates
- Error handling for invalid tokens
- Rate limiting behavior
- Deposition state transitions (draft → published)
3. Test Data Management
- Use
nm099999as disposable test dataset for E2E - Clean up sandbox depositions after tests (delete unpublished drafts)
- Document that published sandbox DOIs are permanent
- Prevent accidental production DOI creation in tests
4. CLI Integration
- Add
--sandboxflag to admin DOI commands - Show clear warnings when using sandbox
- Validate sandbox flag works for all DOI operations
5. Documentation
- Update README with sandbox testing instructions
- Document Zenodo service account setup
- Add examples of sandbox vs production usage
- CI environment variables guide
Implementation Notes
- Existing code in
backend/src/services/zenodo.tsalready supports sandbox - Tests should use
RUN_ZENODO_TESTS=trueto avoid running by default - Sandbox URL: https://sandbox.zenodo.org/api
- Production URL: https://zenodo.org/api
Acceptance Criteria
- All DOI-related tests run against sandbox by default
- CI pipeline includes sandbox tests
- Documentation clearly explains sandbox vs production
- Zero risk of accidental production DOI creation during development
Metadata
Metadata
Assignees
Labels
No labels
Activity