Skip to content

Conversation

@nhinsch
Copy link
Contributor

@nhinsch nhinsch commented Apr 1, 2021

What does this PR do?

Displays a more helpful error message when the integration tests are run without AWS credentials.

Motivation

When a community PR from outside Datadog is submitted, the AWS credentials will not be provided to run the integration tests, and they will fail. We should show a helpful error message so that they know this behavior is expected.

Testing Guidelines

I ran the tests without AWS credentials.

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
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@nhinsch nhinsch requested a review from a team as a code owner April 1, 2021 20:55

if [ -z "$AWS_SECRET_ACCESS_KEY" ]; then
echo "No AWS credentials were found in the environment."
echo "Note that only Datadog employees can run these integration tests."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible for a non-Datadogger to run these tests if they supply their own AWS credentials, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not without modification. The tests expect a specific S3 bucket and IAM role to be in place in the AWS account.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah gotcha. Makes sense!

@nhinsch nhinsch merged commit de0b0d3 into main Apr 1, 2021
@nhinsch nhinsch deleted the ngh/warning branch April 1, 2021 21:08
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