Integration Test of File collection fetaure
Writing integration test to test file collection feature. The test case is executing the following functionality.
- storageInstruction
- upload file using signedUrl
- insert record in storage
- retrivalInstruction
- download file and match the content of file with uploaded content.
Sample response of storageInstruction -
{
"providerKey": "AZURE",
"storageLocation": {
"signedUrl": "https://{accountName}.dfs.core.windows.net/{containerName}/{directoryPath}?{sasToken}",
"fileCollectionSource": "{directoryPath}",
"createdBy": "username"
}
}
Sample request Body of dataSet Registry Id -
{
"datasetRegistries": [
{
"kind": "osdu:wks:dataset--FileCollection.Generic:1.0.0",
....
....
....
....
},
"data": {
"DatasetProperties": {
"FileCollectionPath" : "{{directoryPath}}"
}
}
}
]
}