Skip to content

Conversation

@aledsage
Copy link
Contributor

Integration tests were failing - this PR fixes them.

  • find-monitored-entity:
    • Use findMonitoredEntitiesByName (the old findMonitoredEntityByName no longer exists)
    • Result is no longer a string, but a DqlExecutionResult
    • Fix when no entities provided (throw exception)
    • Removed test for empty string (instead have test for empty list of entities)
  • auth integration tests:
    • Original test send-email.integration.test.ts failed because createDtHttpClient now throws the authorization exception, not sendEmail.
    • Moved authentication test into its own dynatrace-clients.integration.test.ts
    • Create authorization test for send-email
  • davis-copilot-explain-dql:
    • integration test failed non-deterministically because string returned can vary.
  • Fix MCP response text:
    • list_vulnerabilities to use the word "vulnerabilities" rather than problems (to avoid confusion with list_problems)

@dynatrace-cla-bot
Copy link

dynatrace-cla-bot commented Oct 22, 2025

CLA assistant check
All committers have signed the CLA.

@aledsage
Copy link
Contributor Author

See #221 for tracking the issue of the failing integration tests.

Copy link
Collaborator

@christian-kreuzberger-dtx christian-kreuzberger-dtx left a comment

Choose a reason for hiding this comment

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

LGTM

- Original test send-email.integration.test.ts failed because createDtHttpClient now throws the authorization exception, not sendEmail.
- Moved authentication test into its own dynatrace-clients.integration.test.ts
- Create authorization test for send-email
- Use findMonitoredEntitiesByName (the old findMonitoredEntityByName no longer exists)
- Result is no longer a string, but a DqlExecutionResult
- Fix when no entities provided (throw exception)
- Removed test for empty string (instead have test for empty list of entities)
@christian-kreuzberger-dtx christian-kreuzberger-dtx merged commit 4d19ec4 into dynatrace-oss:main Oct 23, 2025
7 checks passed
@christian-kreuzberger-dtx christian-kreuzberger-dtx linked an issue Oct 23, 2025 that may be closed by this pull request
@aledsage aledsage deleted the fix-tests branch October 23, 2025 11:54
christian-kreuzberger-dtx pushed a commit that referenced this pull request Oct 27, 2025
* MCP: fix typos of "vulnerabilities" instead of "problems"

* Fix davis-copilot integration test

* fix and expand on auth integration tests
- Original test send-email.integration.test.ts failed because createDtHttpClient now throws the authorization exception, not sendEmail.
- Moved authentication test into its own dynatrace-clients.integration.test.ts
- Create authorization test for send-email

* Fix integration tests for find-monitored-entity
- Use findMonitoredEntitiesByName (the old findMonitoredEntityByName no longer exists)
- Result is no longer a string, but a DqlExecutionResult
- Fix when no entities provided (throw exception)
- Removed test for empty string (instead have test for empty list of entities)
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.

Failing integration tests

3 participants