Skip to content

Add rule and checks to validate no test cross-imports are performed#7335

Draft
cbeauchesne wants to merge 1 commit into
mainfrom
cbeauchesne/cross_test_imports
Draft

Add rule and checks to validate no test cross-imports are performed#7335
cbeauchesne wants to merge 1 commit into
mainfrom
cbeauchesne/cross_test_imports

Conversation

@cbeauchesne

Copy link
Copy Markdown
Collaborator

Motivation

A test file should not import anything from another test file, as it'll defeat the CI orchestrator mechanism. This rule is easy to miss (8 occurences so far in the test base)

Changes

  • add PR rule for AI
  • Add generic rule for AI
  • Add a test in test_the_test

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@cbeauchesne cbeauchesne added the ai-generated The pull request includes a significant amount of AI-generated code label Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

.cursor/rules/pr-review.mdc                                             @DataDog/system-tests-core
.cursor/rules/repository-structure.mdc                                  @DataDog/system-tests-core
tests/test_the_test/test_conventions.py                                 @DataDog/system-tests-core

@datadog-datadog-prod-us1-2

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

🚦 2 Pipeline jobs failed

Testing the test | Test the test   View in Datadog   GitHub Actions

Testing the test | all-jobs-are-green   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a97af69 | Docs | Datadog PR Page | Give us feedback!

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

Labels

ai-generated The pull request includes a significant amount of AI-generated code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant