Commit c70a0620 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Updated README

parent 3c98aa18
Pipeline #1784 passed with stages
in 1 minute and 22 seconds
# VOSpace REST service # VOSpace REST service
## Database **⚠ Work in progress! ⚠**
This VOSpace implementation uses the database populated by the [VOSpace Transfer Service application](https://www.ict.inaf.it/gitlab/ia2/vospace-transfer-service). The structure of the database is defined in a [separate repository](https://www.ict.inaf.it/gitlab/ia2/vospace-file-catalog). To avoid duplicating database definitions, DAO test classes load the database directly from the files of that repository. We assume that when running the tests the git repository exists and it is located in the same parent folder containing this repository. ## Developer notes
### DAO testing
This VOSpace implementation shares the database with the [VOSpace Transfer Service application](https://www.ict.inaf.it/gitlab/vospace/vospace-transfer-service). The structure of the database is defined in a [separate repository](https://www.ict.inaf.it/gitlab/vospace/vospace-file-catalog). To avoid duplicating database definitions, DAO test classes load the database directly from the files of that repository. We assume that when running the tests the git repository exists and it is located in the same parent folder containing this repository.
To reconfigure the path of that repository edit the property `init_database_scripts_path` in test.properties. To reconfigure the path of that repository edit the property `init_database_scripts_path` in test.properties.
## Loading fake users in MockMvc ### Loading fake users in MockMvc
Test classes annotated with `@SpringBootTest` and `@AutoConfigureMockMvc` can be used to test REST controllers. Theoretically it should be possible configure a fake principal to each test request using the following notation: Test classes annotated with `@SpringBootTest` and `@AutoConfigureMockMvc` can be used to test REST controllers. Theoretically it should be possible configure a fake principal to each test request using the following notation:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment