diff --git a/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java b/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java index 6cff3c53770..26deb3b9f5c 100644 --- a/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java +++ b/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java @@ -44,24 +44,19 @@ import com.datadog.api.client.v2.model.LogsArchiveOrderDefinition; import com.datadog.api.client.v2.model.LogsArchives; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.Arrays; import java.util.List; import org.junit.BeforeClass; import org.junit.Test; -import org.openapitools.jackson.nullable.JsonNullableModule; /** API tests for LogsArchivesApi */ public class LogsArchivesApiTest extends V2APITest { public static final String ARCHIVE_ID = "FOObar"; private static LogsArchivesApi api; - - // ObjectMapper instance configure to not fail when encountering unknown properties - private static ObjectMapper objectMapper = - new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + private static ObjectMapper objectMapper; private final String fixturePrefix = "client/v2/api/logs_archives_fixtures"; private final String apiUriForArchives = "/api/v2/logs/config/archives"; @@ -75,7 +70,7 @@ public String getTracingEndpoint() { @BeforeClass public static void initApi() { api = new LogsArchivesApi(generalApiUnitTestClient); - objectMapper.registerModule(new JsonNullableModule()); + objectMapper = generalApiUnitTestClient.getJSON().getMapper(); } /** diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json index e79f6365c41..485ba02a904 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"container":"my-container","integration":{"client_id":"aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa","tenant_id":"aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"},"path":"/path/blou","region":"my-region","storage_account":"storageAccount","type":"azure"},"name":"datadog-api-client-go Tests Archive","query":"service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"XVlBzgbaiC","type":"archives"}} +{"data": {"attributes": {"destination": {"container": "my-container", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "path": "/path/blou", "region": "my-region", "storage_account": "storageAccount", "type": "azure"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "XVlBzgbaiC", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json index 72503048b5f..6acb992384e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"client_email":"email@email.com","project_id":"aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"},"path":"/path/blou","type":"gcs"},"name":"datadog-api-client-go Tests Archive","query":"service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"XVlBzgbaiC","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"client_email": "email@email.com", "project_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "path": "/path/blou", "type": "gcs"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "XVlBzgbaiC", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json index 59af2e90e72..885ea4ba549 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/blou","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"FOObar","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/blou", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json index 10efbe3e86a..2bff26e7384 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json @@ -1 +1 @@ -{"data":[{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/blou","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"FOObar","type":"archives"}]} +{"data": [{"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/blou", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}]} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json index 8167048b343..ad4d0dc5432 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/blou","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"FOObar","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/blou", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json index 5154396e237..5c293121dcb 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/toto","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"service:toto"},"id":"FOObar","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/toto", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}} \ No newline at end of file