Skip to content

Update "Getting Set Up to Run REST Assured Tests" #9738

@pdurbin

Description

@pdurbin

In #9457 we learned that https://guides.dataverse.org/en/5.13/developers/testing.html#getting-set-up-to-run-rest-assured-tests should be updated to at least cover:

I'm leaving a ... above in case we think of anything else. From a run yesterday of the full API test suite against #9685 as of b627319, the harvesting test above was the only one that failed so that might be it. From #9457 (comment) it was this test:

[ERROR] HarvestingServerIT.testMultiRecordOaiSet:606 Wrong number of items on the first ListIdentifiers page expected:<2> but was:<5>

By the way, there is a detailed note in HarvestingServerIT itself but we should update the guides. Here's that note:

// This test will attempt to create a set with multiple records (enough 
// to trigger a paged respons) and test the resumption token functionality). 
// Note that this test requires the OAI service to be configured with some
// non-default settings (the paging limits for ListIdentifiers and ListRecords
// must be set to 2, in order to be able to trigger this paging behavior without
// having to create and export too many datasets).
// So you will need to do this:
//    asadmin create-jvm-options "-Ddataverse.oai.server.maxidentifiers=2"
//    asadmin create-jvm-options "-Ddataverse.oai.server.maxrecords=2"

On a related note, I mentioned in Slack that I maintain a script called dev-rebuild (see #7363) where I automate these things that developers need to get API tests to pass (createsequence.sql comes to mind). It calls setup-all with --insecure to help developers get set up with the right settings. @landreev and briefly discussed (in that thread) that maybe we need a new flag like --api-tests that can be passed for additional setup such as the harvesting settings and the createsequence thing. So that the API tests can pass. Future work. Out of scope for this issue, which is probably a 3 or our new 0.5.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions