Closed leeper closed 4 months ago
* Use test server
Very recently we set up a Jenkins server that spins up Dataverse on AWS EC2. (And that EC2 instance is terminated later that day.) If we want, we could close this issue and focus on testing over at #22. I'm fine with whatever. 😄
Approximate order of functions to write tests for. The later functions tend to depend on the earlier ones. The classification & order will be updated as I learn more.
get_dataverse()
dataverse_contents()
list_datasets()
get_dataset()
dataset_metadata()
dataset_files()
get_file_metadata()
get_file()
create_dataset()
create_dataverse()
initiate_sword_dataset()
publish_dataset()
publish_dataverse()
publish_sword_dataset()
add_dataset_file()
add_file()
update_dataset()
update_dataset_file()
delete_dataset()
delete_dataverse()
delete_file()
delete_sword_dataset()
dataset_atom()
dataset_statement()
dataset_versions()
dataverse_metadata()
dataverse_search()
get_facets()
get_user_key()
service_document()
set_dataverse_metadata()
See also #40 for discussion on how we will use a live Dataverse for this task. Will close when more of the checklist ^ is completed.
@kuriwaki @wibeasley I just posted a message intended mostly for @JR-1991 about newly published containers for API testing: https://dataverse.zulipchat.com/#narrow/stream/377090-python/topic/containers.20for.20API.20testing
You're very welcome to join Zulip and discuss! (That's the "python" stream but I'm happy to create more streams if you want one.)
Thanks, as always, for all of your contributions to the dataverse
package! ❤️ 🎉 🚀
It works! @kuriwaki @wibeasley check out this awesome work by @JR-1991
https://github.com/gdcc/container-test/actions/runs/4854677636
Great to see it in action! This github actions setup looks like the ideal setup for our test environment. And thank you, @JR-1991.
@kuriwaki I'm getting a strange error when I upload a file: https://dataverse.zulipchat.com/#narrow/stream/377090-python/topic/containers.20for.20API.20testing/near/355010545
Here's my workflow file if you want to try to iterate on it: https://github.com/IQSS/dataverse-sample-data/actions/runs/4856813925/workflow
I am able to create a collection and a dataset, at least, so maybe you could try adding tests for that.
This looks awesome.
Yes! @poikilotherm got it working today! Check it out! https://github.com/IQSS/dataverse-sample-data/actions/runs/4872123218/jobs/8689917400#step:8:74
You should be able to use this as a starting point: https://github.com/IQSS/dataverse-sample-data/compare/container-test
Beep boop.
These days I'm actively using https://github.com/gdcc/api-test-runner to spin up Dataverse in containers using GitHub Actions (the "develop" workflow, usually). You're very welcome to copy it, if it helps. After I spin up Dataverse, I run our (Java-based) API test suite against it.
Longer term we are working on https://github.com/gdcc/dataverse-action which (once it's ready), we'll publish to the GitHub Marketplace.
This is all on topic for our weekly Containerization Working Groups meetings, if you're interested! https://ct.gdcc.io
A new PR from pyDataverse that spins up Dataverse in containers locally:
I suggest we use #134 for an updated discussion ghaction and pyDataverse. Thanks @pdurbin for the updates about pyDataverse and containers here.
edit: jump to list of functions to test