Skip to content

tests: upload resources to S3 in package_revise tests - #2

Merged
paulmueller merged 1 commit into
DCOR-dev:masterfrom
paulmueller-agent:tests-s3-upload
Nov 5, 2026
Merged

paulmueller merged 1 commit into
DCOR-dev:masterfrom
paulmueller-agent:tests-s3-upload

Conversation

@paulmueller-agent

Copy link
Copy Markdown

test_package_revise_upload_not_allowed_active_dataset and test_package_revise_upload_not_allowed_same_resource_name uploaded files via CKAN (update__resources__-1__upload). Since ckanext-dcor_schemas 1.3.0 (DCOR-dev/ckanext-dcor_schemas#44), such uploads are rejected (403) before the checks these tests are about, so they failed with an unexpected error message / status code.

Both tests now upload the file to S3 first (new helper upload_resource_to_s3, using DCOR-Aid's presigned upload) and then add the resource by its id with package_revise, like DCOR-Aid does. The assertions are unchanged:

  • active dataset: "Changing 'resources' not allowed for non-draft"
  • duplicate name: 409 CONFLICT with "already exists"

All 25 tests pass against DCOR-dev.

🤖 Generated with Claude Code

Uploading resources via CKAN is rejected since ckanext-dcor_schemas
1.3.0, before the checks these tests are about. Upload the resources
to S3 first, so that the tests check that resources cannot be added to
active datasets and that resource names must be unique again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paulmueller
paulmueller merged commit 003af8e into DCOR-dev:master Nov 5, 2026
1 check passed
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.

2 participants