This repository contains the autogenerated TypeScript 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.
Developing on this project requires Node 10+, and the Yarn.
DD_TEST_CLIENT_API_KEY: The Datadog API key to run integration tests againstDD_TEST_CLIENT_APP_KEY: The Datadog Application key to run integration tests against
IMPORTANT: Do not use production keys.
This project contains both Integration and Unit tests.
Never run the test suite against an organization with production data.
The testing framework in this repository is @cucumber/cucumber, and can be executed via yarn run test.
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.
Run test with DEBUG=true to display api server calls being made during test execution. This can be useful during debug time.
All test scenarios as automatically generated and located in features/v*/ folders.
Implement new steps in features/step_definitions/request_steps.ts.
Various support files are located in features/support directory:
given.ts: implementation forx-givenextension;hooks.ts: logic for skipping tests based on tags and otherBeforeandAfterhooks;templating.ts: support for{{ ... }}in string objects and path lookup;undo.ts: implementation forx-undoextension;vcr.ts: request recording/replying;world.ts: test context;- and others ...