-
Notifications
You must be signed in to change notification settings - Fork 1
Home
We are going to use a docker image to execute the integration test suite against, this docker image contains a PostgreSQL server. For each integration test suite the data set is restored. To make sure this does not take too long, the data is not stored to disk but to a so-called RAM disk. The consequence of this is that when the docker container is stopped, the data is lost.
- Pull the Docker image:
docker pull rheagroup/cdp4-test-database-community-edition:1.3.1
- Create the CDP4 docker network:
docker network create cdp4
- Start the docker container:
docker run -p 5432:5432 --tmpfs /var/lib/postgresql/data:rw -it -d --name cdp4-test-database-community-edition --net cdp4 rheagroup/cdp4-test-database-community-edition:1.3.1
The purpose of the integration test suite is to test the CDP4® Services. Therefore we must make sure to start them. Make sure that the URL of the database is known to the CDP4® Services by updating the CDP4WebServices.API/config_debug.json
file of the CDP4® Services project.
⚠️ The updated settings file should not be committed to the git repository
- start Visual Studio as Administrator
- update the
CDP4WebServices.API/config_test.json
file of the CDP4® Services- ensure
Backtier.HostName
points to your locally running database instance - ensure
Backtier.IsDbSeedEnabled
is set totrue
- ensure
Backtier.IsDbRestoreEnabled
is set totrue
- ensure
Changelog.CollectChanges
is set totrue
- ensure
- Rebuild the solution in Test mode in case you want to debug them while the tests are running
- Start the services from Visual Studio (F5)
Before the test suite can be executed the test data needs to be seeded. This is done by POST
ing the test-data Annex C.3 zip archive to the database via the CDP4® Services.
- Make sure the
cdp4-test-database-community-edition
docker container is running - Get the latest version of the test data set using
git fetch
andgit pull
- Create a zip archive from the test data set
curl --form file=@"Data.zip" http://localhost:5000/Data/Exchange
⚠️ The updated settings file should not be committed to the git repository
- Open the integration test solution using Visual Studio 2019
- Make sure that the integration test suite settings connect to your local instance by updating the
settings.json
file - run all the tests and verify that all tests are passing
copyright @ Starion Group S.A.