Skip to content

Commit

Permalink
enable codeMeta20 test, disable size=6 test #10519
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Nov 6, 2024
1 parent 4c45fc0 commit 4f77a3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public class DatasetTypesIT {
Expand Down Expand Up @@ -408,13 +407,6 @@ public void testUpdateDatasetTypeLinksWithMetadataBlocks() {
.body("data[0].name", is("citation"));
}

/**
* This test is disabled because loads the "codeMeta20" metadata block.
*
* Loading any additional block causes this test to fail:
* MetadataBlocksIT#testListMetadataBlocks
*/
@Disabled
@Test
public void testLinkSoftwareToCodemeta() {
Response listBlocksAvailable = UtilIT.listMetadataBlocks(false, false);
Expand Down
11 changes: 8 additions & 3 deletions src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import org.junit.jupiter.api.Disabled;

public class MetadataBlocksIT {

Expand All @@ -21,13 +22,17 @@ public static void setUpClass() {
RestAssured.baseURI = UtilIT.getRestAssuredBaseUri();
}

/**
* TODO: re-enable this test after deciding how to allow additional metadata
* blocks to be added by other tests. We load the "codeMeta20" block in
* DatasetTypesIT#testLinkSoftwareToCodemeta but it causes this test to
* break. It asserts there are only 6 blocks, for example.
*/
@Disabled
@Test
void testListMetadataBlocks() {
// No optional params enabled
Response listMetadataBlocksResponse = UtilIT.listMetadataBlocks(false, false);
// TODO: consider re-writing this test to allow additional metadata blocks
// to be added by other tests. We'd like to load the "codeMeta20" block in
// DatasetTypesIT#testLinkSoftwareToCodemeta but it causes this test to break.
int expectedDefaultNumberOfMetadataBlocks = 6;
listMetadataBlocksResponse.then().assertThat()
.statusCode(OK.getStatusCode())
Expand Down

0 comments on commit 4f77a3b

Please sign in to comment.