Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra/DPPB-945 Integration tests #242

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

benpauleypa
Copy link
Contributor

…integration tests

As a contributor

By submitting this PR I confirm I have read and understood the Github Standards document and understand the role I play in ensuring standards, security, and assurance at DfT.

As a PR reviewer

By accepting this PR I understand my responsibilities as described in the the Github standards document.

Proposed changes

Describe the big picture of your changes here to make it clear what your pull request will change. Make sure to explain the what e.g. the functionality it changes not the how e.g. what code you have written. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation Update (change to naming or other documentation)

Points I have checked in my code

Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • I have added unit tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have checked that my changes have not broken any other functionality
  • I have linked to any issues this PR fixes

Points for review

Add checkboxes here for any specific aspects of your PR you would like to be checked in peer review. If you don't specify anything here, the reviewer will check:

  • All of your unit tests pass
  • Your code is clear and easy to understand
  • You have documented any new features
  • They can run the code you have written
  • Your changes do not break any other functionality

Security considerations

Put an x in the boxes that apply. You should have considered all of these points before submitting a PR.

  • My code does not contain any secrets such as passwords, API keys, etc
  • I have not accidentally uploaded any data to Github
  • My code does not include any personal information such as names or email addresses

Who is reviewing this PR?

Tag your reviewer here to ensure they get a notification!

@benpauleypa benpauleypa changed the title Infra/DPPB-945 integration tests Infra/DPPB-945 Integration tests Jan 29, 2025
Copy link
Contributor

@Gabriel-Popescu Gabriel-Popescu left a comment

Choose a reason for hiding this comment

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

Do you want to try and add an in-memory database using entity framework, rather than using yet another instance of postgreSQL database?

@benpauleypa
Copy link
Contributor Author

benpauleypa commented Jan 29, 2025

Do you want to try and add an in-memory database using entity framework, rather than using yet another instance of postgreSQL database?

Reading into this a bit more, Microsoft actually recommend you don't do this. They mention that there are differences between the production and in-memory databsases, and so discourage its use.

image

Given that the approach here is to spin up a Docker container as part of CI which gives us a replica of the production database, I suggest we go with this approach. There is no code changes needed for this method, as the database connections is handled by environment variables, and we shouldn't run into any nasty surprises due to differences between the production and testing databases which would take time and effort to fix.

@Gabriel-Popescu Gabriel-Popescu self-requested a review January 30, 2025 13:13
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