Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -75,7 +70,7 @@ public String getTracingEndpoint() {
@BeforeClass
public static void initApi() {
api = new LogsArchivesApi(generalApiUnitTestClient);
objectMapper.registerModule(new JsonNullableModule());
objectMapper = generalApiUnitTestClient.getJSON().getMapper();
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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"}}
Original file line number Diff line number Diff line change
@@ -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"}}
Original file line number Diff line number Diff line change
@@ -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"}}
Original file line number Diff line number Diff line change
@@ -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"}]}
Original file line number Diff line number Diff line change
@@ -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"}}
Original file line number Diff line number Diff line change
@@ -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"}}
Loading