diff --git a/fda-query-service/rest-service/src/test/java/at/tuwien/service/QueryServiceIntegrationTest.java b/fda-query-service/rest-service/src/test/java/at/tuwien/service/QueryServiceIntegrationTest.java index ff2b07d0c10f0b07052c128bea344c24a1f53c72..f0d75ef9991ad9fc5fae785956338b8792d6b66a 100644 --- a/fda-query-service/rest-service/src/test/java/at/tuwien/service/QueryServiceIntegrationTest.java +++ b/fda-query-service/rest-service/src/test/java/at/tuwien/service/QueryServiceIntegrationTest.java @@ -261,7 +261,8 @@ public class QueryServiceIntegrationTest extends BaseUnitTest { TableMalformedException, DatabaseConnectionException, DatabaseNotFoundException, ImageNotSupportedException, ContainerNotFoundException, InterruptedException { final TableCsvDto request = TableCsvDto.builder() - .data(Map.of("date", "2008-12-04", + .data(Map.of("id", 4L, + "date", "2008-12-04", "location", "Melbourne", "mintemp", 5, "rainfall", 0)) @@ -282,7 +283,8 @@ public class QueryServiceIntegrationTest extends BaseUnitTest { @Test public void insert_violatingForeignKey_fails() throws InterruptedException { final TableCsvDto request = TableCsvDto.builder() - .data(Map.of("date", "2008-12-04", + .data(Map.of("id", 4L, + "date", "2008-12-04", "location", "Mexico City", // not in referenced table "mintemp", 5, "rainfall", 0)) @@ -305,7 +307,8 @@ public class QueryServiceIntegrationTest extends BaseUnitTest { @Test public void insert_violatingUnique_fails() throws InterruptedException { final TableCsvDto request = TableCsvDto.builder() - .data(Map.of("date", "2008-12-03", // entry with date already exists + .data(Map.of("id", 4L, + "date", "2008-12-03", // entry with date already exists "location", "Melbourne", "mintemp", 5, "rainfall", 0)) @@ -328,7 +331,8 @@ public class QueryServiceIntegrationTest extends BaseUnitTest { @Test public void insert_violatingCheck_fails() throws InterruptedException { final TableCsvDto request = TableCsvDto.builder() - .data(Map.of("date", "2008-12-04", + .data(Map.of("id", 4L, + "date", "2008-12-04", "location", "Melbourne", "mintemp", -1, // mintemp is smaller than 0, which is not allowed "rainfall", 0))