Skip to content

[GPCAPIM-350] Add contract tests for SDS stub#154

Merged
ian-robinson-35 merged 8 commits intomainfrom
feature/GPCAPIM-350_sds_stub_contract_tests
Apr 10, 2026
Merged

[GPCAPIM-350] Add contract tests for SDS stub#154
ian-robinson-35 merged 8 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.

@ian-robinson-35 ian-robinson-35 changed the title Add contract tests for SDS stub [GPCAPIM-350] Add contract tests for SDS stub Apr 9, 2026
@github-actions
Copy link
Copy Markdown

Deployment Complete

@sonarqubecloud
Copy link
Copy Markdown

@ian-robinson-35 ian-robinson-35 merged commit 88227ef into main Apr 10, 2026
71 of 72 checks passed
@ian-robinson-35 ian-robinson-35 deleted the feature/GPCAPIM-350_sds_stub_contract_tests branch April 10, 2026 10:03
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.

4 participants