Skip to content

Add contract tests for SDS stub#154

Open
Vox-Ben wants to merge 2 commits intomainfrom
feature/GPCAPIM-350_sds_stub_contract_tests
Open

Add contract tests for SDS stub#154
Vox-Ben wants to merge 2 commits intomainfrom
feature/GPCAPIM-350_sds_stub_contract_tests

Conversation

@Vox-Ben
Copy link
Copy Markdown
Contributor

@Vox-Ben Vox-Ben commented Apr 2, 2026

Description

This adds contract tests for the SDS stub.

Context

The SDS stub needs to faithfully implement the /Device and /Endpoint endpoints for the SDS service. We need tests to verify that this is the case and that any changes made don't break the fidelity of the interface.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@Vox-Ben Vox-Ben requested a review from a team as a code owner April 2, 2026 15:24
Copilot AI review requested due to automatic review settings April 2, 2026 15:24
Copy link
Copy Markdown
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

Adds a new contract test suite to validate that the in-memory SDS FHIR stub conforms to the expected GET /Device and GET /Endpoint response contracts (including success, validation errors, routing via get(), and dynamic upsert/clear behaviour).

Changes:

  • Added contract tests for SDS stub GET /Device and GET /Endpoint (200 + 400 scenarios).
  • Added assertions around response headers/body structure (Bundle/OperationOutcome) and correlation-id echoing.
  • Added coverage for the stub’s get() routing and upsert/clear helper methods.

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Deployment Complete

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