Skip to content

chore: use dry run/mocks for fips tests#2100

Merged
ava-silver merged 3 commits intomasterfrom
ava.silver/chore/use-dry-run-for-commands-that-support-it
Feb 12, 2026
Merged

chore: use dry run/mocks for fips tests#2100
ava-silver merged 3 commits intomasterfrom
ava.silver/chore/use-dry-run-for-commands-that-support-it

Conversation

@ava-silver
Copy link
Contributor

@ava-silver ava-silver commented Feb 12, 2026

What and why?

This PR adds automatic detection of --dry-run support for commands in the CLI test suite. This prevents real API calls during tests and makes the test suite more robust.

Added because I was seeing flaky tests, and I think this should fix it

How?

  • Added a new supportsDryRun helper function that checks if a command class supports the --dry-run option
  • Modified the test suite to automatically append --dry-run to commands that support it
  • Removed hardcoded --dry-run flags from the requiredOptions object, as they're now added dynamically
  • Added mocks for network-related modules to prevent real network calls
  • Added code to strip API keys during tests to ensure commands bail out early

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

@ava-silver ava-silver marked this pull request as ready for review February 12, 2026 17:19
@ava-silver ava-silver requested a review from a team as a code owner February 12, 2026 17:19
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ava-silver ava-silver added the chores Related to the CI or developer experience label Feb 12, 2026 — with Graphite App
@datadog-official
Copy link

datadog-official bot commented Feb 12, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@ava-silver ava-silver requested a review from Drarig29 February 12, 2026 17:23
@ava-silver ava-silver changed the title chore: use dry run for commands that support it chore: use dry run/mocks for fips tests Feb 12, 2026
@ava-silver ava-silver merged commit 678bff5 into master Feb 12, 2026
26 checks passed
@ava-silver ava-silver deleted the ava.silver/chore/use-dry-run-for-commands-that-support-it branch February 12, 2026 18:38
@ava-silver ava-silver mentioned this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chores Related to the CI or developer experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants