Skip to content

Commit

Permalink
disable loading of metadata blocks in API tests #9868
Browse files Browse the repository at this point in the history
Disabled because once there are new fields in the database that Solr
doesn't know about, dataset creation could be prevented, or at least
subsequent search operations could fail because the dataset can't be
indexed.
  • Loading branch information
pdurbin committed Sep 1, 2023
1 parent ed81893 commit ea333c9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,13 @@ public void testMigrateHDLToDOI() {
.statusCode(OK.getStatusCode());
}

/**
* Disabled because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Disabled
@Test
public void testLoadMetadataBlock_NoErrorPath() {
Response createUser = UtilIT.createRandomUser();
Expand Down Expand Up @@ -778,6 +785,13 @@ public void testLoadMetadataBlock_NoErrorPath() {
assertEquals(244, (int) statistics.get("Controlled Vocabulary"));
}

/**
* Disabled because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Disabled
@Test
public void testLoadMetadataBlock_ErrorHandling() {
Response createUser = UtilIT.createRandomUser();
Expand Down
9 changes: 8 additions & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,14 @@ static Response updateDatasetPIDMetadata(String persistentId, String apiToken)
.post("/api/datasets/:persistentId/modifyRegistrationMetadata/?persistentId=" + persistentId);
return response;
}


/**
* Deprecated because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Deprecated
static Response loadMetadataBlock(String apiToken, byte[] body) {
return given()
.header(API_TOKEN_HTTP_HEADER, apiToken)
Expand Down

0 comments on commit ea333c9

Please sign in to comment.