Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-5224] Unit Tests for Cedar Metadata Backend API - Part 2 #10534

Conversation

cslzchen
Copy link
Collaborator

@cslzchen cslzchen commented Feb 6, 2024

Purpose

Unit tests for Cedar backend API

  • Serializers for cedar metadata template and record
  • List for template
  • List for record
  • ListCreate for record
  • Detail (Retrieve/Update/Delete) for record
  • MetadataDownload for record
  • List for record under /v2/nodes/, /v2/registrations/,/v2/files/

Note: tests cover all combinations below

  • Private or public resource
  • Published or draft record
  • Empty, non-contributor, read, write, or admin auth
  • Nodes, registrations, or files

Changes

See Purpose

QA Notes

N/A

Documentation

N/A

Side Effects

N/A

Ticket

https://openscience.atlassian.net/browse/ENG-5224

@cslzchen cslzchen marked this pull request as draft February 6, 2024 16:38
@cslzchen cslzchen force-pushed the feature/eng-5224-unit-tests branch from 86d5f6f to 62a1293 Compare February 6, 2024 17:14
* Only write/admin can create, otherwise raise 403
* Creating record with inactive tempaltes will raise 404
* No auth -> 401
* Non-contributor or read contributor -> 403
* Inactive template -> 404
@cslzchen cslzchen mentioned this pull request Feb 6, 2024
4 tasks
* Remove unecessary permission class for list views
* Apply similar permission check for related record views
  in nodes, registration and files
@cslzchen cslzchen changed the title [ENG-5224] Unit Tests for Cedar Metadata Backend API [ENG-5224] Unit Tests for Cedar Metadata Backend API - Part 2 Feb 6, 2024
@cslzchen cslzchen force-pushed the feature/eng-5224-unit-tests branch from 2e7cac7 to d7d1153 Compare February 7, 2024 22:18
@cslzchen cslzchen marked this pull request as ready for review February 12, 2024 21:38
@cslzchen cslzchen merged commit 9699cd8 into CenterForOpenScience:feature/cedar-integration Feb 13, 2024
6 checks passed
@cslzchen cslzchen deleted the feature/eng-5224-unit-tests branch October 9, 2024 16:15
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