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

Create an integration test for running a mission #1010

Open
2 tasks
andchiind opened this issue Sep 18, 2023 · 9 comments
Open
2 tasks

Create an integration test for running a mission #1010

andchiind opened this issue Sep 18, 2023 · 9 comments
Labels
backend Backend related functionality epic improvement Improvement to existing functionality

Comments

@andchiind
Copy link
Contributor

andchiind commented Sep 18, 2023

Describe the improvement you would like to see
Create an integration test which checks that that we are able to create and start a custom and echo mission. This test should utilise a database that is not in memory, such as the dev database but ideally we would use a test database. We should also not mock anything, but we should use isar-robot as our target robot. This test should run as a github action check before merging a PR, but ideally after finishing migrations.

Linked to

How will this change existing functionality?
This will allow us to test that there won't be any significant errors that halt testing offshore, and it will let us detect database validation errors which the in-memory database is unable to simulate.

How will this improvement affect the current Threat Model?
Assuming we correctly retrieve our keys for validating our HTTP requests in the github actions, the threat model should not be affected.

@andchiind andchiind added backend Backend related functionality improvement Improvement to existing functionality labels Sep 18, 2023
@oysand
Copy link
Contributor

oysand commented Sep 25, 2023

Check if we can use the test API for STID, SLIMM and Echo

@Christdej
Copy link
Contributor

To be able to call the backend from the from the frontend we have a few choices:

  • Make a testuser that can have access to test versions of the integrations we have (STID SLIMM ECHO).
  • Make it possible to disable authentication on the backend and do this when testing
  • Mock the authentication when testing for both frontend and backend

@Christdej
Copy link
Contributor

The easiest option might be to set the environment to "test", and then make the Program.cs use the same authentication and authrization setup as the TestWebApplicationFactory when the environment is "test" and then in the frontend create a test-user that will be able to authenticate.

@UsamaEquinorAFK
Copy link
Contributor

Have we fixed the authentication problem ? @Christdej @andchiind ?

@Christdej
Copy link
Contributor

Nope,
I would suggest doing
#1203 and #1204
Before starting on this

@tsundvoll tsundvoll added the epic label Nov 27, 2023
@aeshub
Copy link
Contributor

aeshub commented Jan 27, 2024

This issue has automatically been marked as stale as there has been no activity for 60 days.

@aeshub aeshub added the stale This issue or pull request already exists label Jan 27, 2024
@haakonsf haakonsf removed the stale This issue or pull request already exists label May 2, 2024
@aeshub
Copy link
Contributor

aeshub commented Jul 5, 2024

This issue has automatically been marked as stale as there has been no activity for 60 days.

@aeshub aeshub added the stale This issue or pull request already exists label Jul 5, 2024
@Christdej Christdej removed the stale This issue or pull request already exists label Aug 5, 2024
@aeshub
Copy link
Contributor

aeshub commented Oct 9, 2024

This issue has automatically been marked as stale as there has been no activity for 60 days.

@aeshub aeshub added the stale This issue or pull request already exists label Oct 9, 2024
@tsundvoll
Copy link
Contributor

tsundvoll commented Jan 13, 2025

Related to change with tests, were the tests will not share database resources. Also easier setup of tests.
#1941

@aeshub aeshub removed the stale This issue or pull request already exists label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related functionality epic improvement Improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

7 participants