Skip to content

Conversation

@ivicac
Copy link
Contributor

@ivicac ivicac commented Jan 21, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request replaces unit tests with integration tests for GraphQL controllers in the MCP (Model Context Protocol) modules. The PR introduces proper GraphQL slice testing using Spring's @GraphQlTest annotation, replacing the previous unit tests that used @ExtendWith(MockitoExtension.class). Additionally, it includes a production code fix to handle null parameters in the McpToolGraphQlController.

Changes:

  • Replaced 6 unit test classes with 6 integration test classes using @GraphQlTest
  • Added test configuration classes with mock bean definitions and GraphQL scalar type implementations
  • Created test-specific GraphQL schema files for integration testing
  • Fixed null-safety issue in McpToolGraphQlController.createMcpTool() method
  • Added test dependency for app-config module

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test.graphqls (platform-mcp) Test-only GraphQL schema with minimal type stubs for platform MCP tests
test.graphqls (automation-mcp) Complete test schema with all types, queries, and mutations for automation MCP tests
McpGraphQlTestConfiguration.java Test configuration providing mocked beans and GraphQL scalar types for platform MCP
AutomationMcpGraphQlTestConfiguration.java Test configuration providing mocked beans and GraphQL scalar types for automation MCP
McpGraphQlConfigurationSharedMocks.java Annotation consolidating common @MockitoBean declarations for platform MCP tests
AutomationMcpGraphQlConfigurationSharedMocks.java Annotation consolidating common @MockitoBean declarations for automation MCP tests
*IntTest.java (6 files) New integration tests using GraphQlTester for end-to-end GraphQL testing
*Test.java (6 deleted files) Removed unit tests that tested controllers in isolation with mocked services
McpToolGraphQlController.java Added null-safety check for optional parameters field in createMcpTool mutation
build.gradle.kts Added test dependency for app-config module

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ivicac ivicac requested a review from matijapetanjek January 22, 2026 05:18
@sonarqubecloud
Copy link

@ivicac ivicac force-pushed the 2445_1 branch 2 times, most recently from e71d9f9 to d773845 Compare January 22, 2026 18:04
@ivicac ivicac merged commit 8bcfae1 into master Jan 22, 2026
2 checks passed
@ivicac ivicac deleted the 2445_1 branch January 22, 2026 18:05
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.

2 participants