Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.76 KB

File metadata and controls

36 lines (22 loc) · 1.76 KB

Development

This repository contains the autogenerated Python client for the Datadog API. The client code, feature files, and test data are generated from Datadog's public OpenAPI specifications by internal tooling.

We welcome contributions that expand or improve the client's capabilities. As part of the pull request review process, Datadog's internal tooling may regenerate the affected code, feature files, and test data based on the proposed changes.

Testing

Prerequisite

Export the following environment variables:

  • DD_TEST_CLIENT_API_KEY: The Datadog API key to run integration tests against
  • DD_TEST_CLIENT_APP_KEY: The Datadog Application key to run integration tests against

IMPORTANT: Do not use production keys.

Tests can be run againts different site (EU, staging, local):

  • DD_TEST_SITE: The base URL for test site (e.g. datadoghq.eu)

NOTE: All recorded URLs will be replaced by datadoghq.com. Please make sure that you do NOT leak any any sensitive information.

Commands

This project contains both Integration and Unit tests. Never run the test suite against an organization with production data.

In the root directory, run pip install .\[tests\] then ./run-tests.sh before tests can be executed via pytest.

You can optionally add -k <testName> to filter individual tests.

By default integration tests use recorded API responses stored in cassettes. To record new API responses run the tests with RECORD=true. To run integration tests against API without recording cassettes, run the tests with RECORD=none.

IMPORTANT: When creating a PR that adds or updates a test, never commit generated code, only commit test files being updated and any updated cassettes.