Skip to content

Commit

Permalink
Merge branch 'develop' into 6.1-making-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Dec 19, 2023
2 parents da20f26 + e958ce5 commit 5656281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -4288,7 +4288,7 @@ public Response getDatasetVersionArchivalStatus(@Context ContainerRequestContext
headers);

if (dsv.getArchivalCopyLocation() == null) {
return error(Status.NO_CONTENT, "This dataset version has not been archived");
return error(Status.NOT_FOUND, "This dataset version has not been archived");
} else {
JsonObject status = JsonUtil.getJsonObject(dsv.getArchivalCopyLocation());
return ok(status);
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,8 @@ public void testArchivalStatusAPI() throws IOException {

//Verify the status is empty
Response nullStatus = UtilIT.getDatasetVersionArchivalStatus(datasetId, "1.0", apiToken);
nullStatus.then().assertThat().statusCode(NO_CONTENT.getStatusCode());
nullStatus.prettyPrint();
nullStatus.then().assertThat().statusCode(NOT_FOUND.getStatusCode());

//Set it
Response setStatus = UtilIT.setDatasetVersionArchivalStatus(datasetId, "1.0", apiToken, "pending",
Expand All @@ -3309,7 +3310,7 @@ public void testArchivalStatusAPI() throws IOException {

//Make sure it's gone
Response nullStatus2 = UtilIT.getDatasetVersionArchivalStatus(datasetId, "1.0", apiToken);
nullStatus2.then().assertThat().statusCode(NO_CONTENT.getStatusCode());
nullStatus2.then().assertThat().statusCode(NOT_FOUND.getStatusCode());

}

Expand Down

0 comments on commit 5656281

Please sign in to comment.