Skip to content

test: ✅ add publish integration test - #143

Open
martonvago wants to merge 6 commits into
mainfrom
test/integration-test
Open

test: ✅ add publish integration test#143
martonvago wants to merge 6 commits into
mainfrom
test/integration-test

Conversation

@martonvago

@martonvago martonvago commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds an integration test for the existing publish command (happy path only).

Closes #75

Needs a thorough review.

Checklist

  • Ran just run-all


- name: Run Zenodo integration test in the sandbox
env:
ZENODO_SANDBOX_TOKEN: ${{ secrets.ZENODO_SANDBOX_TOKEN }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a new sandbox user and got a token for it

env:
ZENODO_SANDBOX_TOKEN: ${{ secrets.ZENODO_SANDBOX_TOKEN }}
run: |
uv run pytest tests/integration/test_publish.py

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's easier if this is orchestrated in Python (/ Rust I guess) and not in the workflow file or in bash.

ZenodoCreator(
name="John Doe",
affiliation="Test University",
orcid="0000-0002-1825-0097",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Josiah Stinkney Carberry is a fictional professor, created as a joke in 1929. He is said to still teach at Brown University, and to be known for his work in "psychoceramics", the supposed study of "cracked pots".

https://orcid.org/0000-0002-1825-0097

## Check deposit directly on Zenodo
deposit = _check_deposit_on_zenodo(deposit_id, updated_metadata, file_path, client)
updated_file_size = deposit["files"][0]["filesize"]
assert updated_file_size > file_size, "New file should be larger than old file."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a proxy for checking the contents (which we could do as well by downloading the files)

@martonvago martonvago moved this from Todo to In review in Platform development Aug 18, 2026
@martonvago
martonvago marked this pull request as ready for review August 18, 2026 09:45
@martonvago
martonvago requested a review from lwjohnst86 August 18, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Create integration test to test the actual API (sandbox) and run monthly

1 participant