Closed markpatton closed 4 months ago
@markpatton @bbranan
Depending on what we want the goal of the deployment tests coverage to be, here are a few changes that could be made:
a) Change the test data cleanup to programmatically delete the test deposit from j10p in stage and prod. This assumes we are ok having the test deposit in prod j10p for a couple minutes. This also assumes there is a j10p api we can call to delete the deposit. We can also investigate if we can deposit our test submissions as hidden or not public in j10p, but that would require new code in deposit services to only do this for test submissions.
b) Change the deposit services to look for test submissions (any submission associated to the E2E test grant) and do everything except executing the transport code (sends the deposit to j10p) and set the Deposit to Accepted.
c) Do option a) for non-prod environment and do b) for prod environment.
d) Do b) for prod environment and keep deployment tests as they are for non-prod environment with a reminder to clean up test deposits in the j10p test instance every so often manually.
For the prod environment, if we don't do option a), then we will have no integration tests with prod j10p, so we won't know if there is an issue until an actual user tries to make a submission. This would be a compromise in how confident we can be when we deploy a new version of PASS.
We can also investigate if we can deposit our test submissions as hidden or not public in j10p, but that would require new code in deposit services to only do this for test submissions.
It does appear possible to DELETE an item based on the dspace docs: https://github.com/DSpace/RestContract/blob/dspace-7_x/items.md#deleting-an-item . We would have to try this out and ensure it works as expected.
In the PASS weekly status meeting, we decided to go with option c) above with a small change. So in summary:
What?
The pass-acceptance-testing tests are run against production on release. (Are they also run against staging? Should investigate staging as well.) They make deposits to JScholarship. The PASS objects created are cleaned up by pass-deposit-services, but there is nothing to cleanup the JScholarship deposits. Figure out and implement a cleanup mechanism.
Why?
Production jscholarship should not have test submissions.
How?
Perhaps we just need to setup a procedure to request that test submissions be deleted? Or perhaps pass-acceptance-testing (or pass-deposit-services) should be responsible for automatically deleting JScholarship test deposits.
Acceptance Criteria
Test deposits no longer accumulate in JScholarship.
Related Issues