Skip to content

Commit

Permalink
Fix cascade deletion test (#61)
Browse files Browse the repository at this point in the history
* specify cascade deletion + specify service identity

* add back mutable: false to immutable type
  • Loading branch information
valenzuelaomar authored Jun 21, 2024
1 parent 9d77c58 commit 603f810
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test_app/schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ classes:
range: SequencingRead
multivalued: true
inverse: SequencingRead.sample
annotations:
cascade_delete: true
system_mutable_field:
range: string
annotations:
Expand Down Expand Up @@ -342,4 +344,5 @@ classes:
range: string
required: true
annotations:
mutable: false
plural: ImmutableTypes
2 changes: 1 addition & 1 deletion test_app/tests/test_cascade_deletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def test_cascade_delete(
}}
}}
"""
result = await gql_client.query(query, user_id=user_id, member_projects=[project_id])
result = await gql_client.query(query, user_id=user_id, member_projects=[project_id], service_identity="workflows")
assert result["data"]["deleteSample"][0]["id"] == str(sequencing_reads[0].sample_id)

# The first SequencingRead should be deleted
Expand Down

0 comments on commit 603f810

Please sign in to comment.