Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix env.spec.ts test #137

Merged
merged 3 commits into from
Dec 10, 2024
Merged

Fix env.spec.ts test #137

merged 3 commits into from
Dec 10, 2024

Conversation

lym953
Copy link
Contributor

@lym953 lym953 commented Oct 22, 2024

What does this PR do?

Loosen the check in the test env.spec.ts so it can pass on my machine.

Before, the tests require that the params fetched by getConfigFromCfnParams() exactly match the expected dict. I changed it to require the params fetched be a superset of the expected dict.

Motivation

When I run npm test on my machine, a few tests in env.spec.ts fail because the config retrieved has some extra fields than expected, such as apiKey. This is just because I have DD_API_KEY set on my machine using export DD_API_KEY=xxx, and probably it was not set on the test author's machine when she wrote this test. I think we should loosen the check so this difference won't be treated as a failure.

Testing Guidelines

Run npm test. The tests changed from failing to passing.

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

@lym953 lym953 requested a review from a team as a code owner October 22, 2024 19:18
@duncanista duncanista merged commit bf02c45 into main Dec 10, 2024
12 checks passed
@duncanista duncanista deleted the yiming.luo/fix-test branch December 10, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants