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

Refactor E2E tests #1593

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Refactor E2E tests #1593

wants to merge 8 commits into from

Conversation

fanny-jiang
Copy link
Contributor

@fanny-jiang fanny-jiang commented Dec 27, 2024

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

  • github.com/DataDog/datadog-agent/test/new-e2e go module is currently pinned to an older version, so some CI checks will fail. Version will be bumped before merging. See below for testing locally

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

To run locally:

From the test/e2e directory, run go get github.com/DataDog/datadog-agent/test/new-e2e@1cc7604f4b6b35a230b3dc1226d35b86034a832a

You may also need to add this replace block to the test/e2e/go.mod file and use the development version generated by the go get command:

replace (
	github.com/DataDog/datadog-agent/comp/core/tagger/types => github.com/DataDog/datadog-agent/comp/core/tagger/types <dev_version>
	github.com/DataDog/datadog-agent/comp/otelcol/ddflareextension/dev =>  github.com/DataDog/datadog-agent/comp/otelcol/ddflareextension/dev <dev_version>
	github.com/DataDog/datadog-agent/comp/otelcol/ddflareextension/def => github.com/DataDog/datadog-agent/comp/otelcol/ddflareextension/def <dev_version>
)
  • Run TestLocalKindSuite tests (creates local kind environment):
    • From the /test/e2e directory: go test ./... -run TestLocalKindSuite -count=1 -v -timeout=0s
  • Run TestAWSKindSuite tests (creates aws kind environment):
    • From the /test/e2e directory: aws-vault exec <aws_profile> -- make e2e-tests

Notes:

  • To keep pulumi stacks, prepend the env vars, E2E_SKIP_DELETE_ON_FAILURE=true E2E_DEV_MODE=true
  • Don't use make e2e-tests-keep-stacks

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

Comment on lines +213 to +214
cd test/e2e && go get github.com/DataDog/datadog-agent/test/new-e2e@1cc7604f4b6b35a230b3dc1226d35b86034a832a
cd $(ROOT)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: these lines are for testing in the CI. They'll be removed when test/e2e/go.mod is updated with the new version when it is available.

@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.94%. Comparing base (0ca2c91) to head (3f8fdb0).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1593   +/-   ##
=======================================
  Coverage   48.94%   48.94%           
=======================================
  Files         227      227           
  Lines       20636    20636           
=======================================
  Hits        10101    10101           
  Misses      10010    10010           
  Partials      525      525           
Flag Coverage Δ
unittests 48.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ca2c91...3f8fdb0. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants