Search in sources :

Example 16 with FileLoadModel

use of bio.terra.model.FileLoadModel in project jade-data-repo by DataBiosphere.

the class DataRepoFixtures method ingestFileLaunch.

public DataRepoResponse<JobModel> ingestFileLaunch(TestConfiguration.User user, String datasetId, String profileId, String sourceGsPath, String targetPath) throws Exception {
    FileLoadModel fileLoadModel = new FileLoadModel().sourcePath(sourceGsPath).profileId(profileId).description(null).mimeType("application/octet-string").targetPath(targetPath);
    String json = TestUtils.mapToJson(fileLoadModel);
    return dataRepoClient.post(user, "/api/repository/v1/datasets/" + datasetId + "/files", json, JobModel.class);
}
Also used : FileLoadModel(bio.terra.model.FileLoadModel)

Aggregations

FileLoadModel (bio.terra.model.FileLoadModel)16 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)7 Test (org.junit.Test)7 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)7 FileModel (bio.terra.model.FileModel)6 URI (java.net.URI)5 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)5 MvcResult (org.springframework.test.web.servlet.MvcResult)5 FlightMap (bio.terra.stairway.FlightMap)4 DataDeletionGcsFileModel (bio.terra.model.DataDeletionGcsFileModel)3 ErrorModel (bio.terra.model.ErrorModel)3 UUID (java.util.UUID)3 DeleteResponseModel (bio.terra.model.DeleteResponseModel)2 IngestRequestModel (bio.terra.model.IngestRequestModel)2 FSFileInfo (bio.terra.service.filedata.FSFileInfo)2 FileSystemAbortTransactionException (bio.terra.service.filedata.exception.FileSystemAbortTransactionException)2 FireStoreFile (bio.terra.service.filedata.google.firestore.FireStoreFile)2 StepResult (bio.terra.stairway.StepResult)2 BlobInfo (com.google.cloud.storage.BlobInfo)2 BulkLoadFileModel (bio.terra.model.BulkLoadFileModel)1