diff --git a/src/api/Controllers/ImportController.cs b/src/api/Controllers/ImportController.cs index d6522b620..07cb89e5c 100644 --- a/src/api/Controllers/ImportController.cs +++ b/src/api/Controllers/ImportController.cs @@ -117,13 +117,12 @@ public async Task> UploadJsonFileAsync(int workgroupId, IFormF /// /// The of the new (s). /// The containing the borehole csv records that were uploaded. - /// The list of containing the borehole attachments referred in . /// The number of the newly created s. [HttpPost] [Authorize(Policy = PolicyNames.Viewer)] [RequestSizeLimit(int.MaxValue)] [RequestFormLimits(MultipartBodyLengthLimit = MaxFileSize)] - public async Task> UploadFileAsync(int workgroupId, IFormFile boreholesFile, IList? attachments = null) + public async Task> UploadFileAsync(int workgroupId, IFormFile boreholesFile) { // Increase max allowed errors to be able to return more validation errors at once. ModelState.MaxAllowedErrors = 1000; @@ -137,14 +136,8 @@ public async Task> UploadFileAsync(int workgroupId, IFormFile // Checks if the provided boreholes file is a CSV file. if (!FileTypeChecker.IsCsv(boreholesFile)) return BadRequest("Invalid file type for borehole csv."); - // Checks if any of the provided attachments has a whitespace in its file name. - if (attachments?.Any(a => a.FileName.Any(char.IsWhiteSpace)) == true) return BadRequest("One or more file name(s) contain a whitespace."); - - // Checks if any of the provided attachments exceeds the maximum file size. - if (attachments?.Any(a => a.Length > MaxFileSize) == true) return BadRequest($"One or more attachment exceed maximum file size of {MaxFileSize / 1024 / 1024} Mb."); - var boreholeImports = ReadBoreholesFromCsv(boreholesFile); - ValidateBoreholeImports(workgroupId, boreholeImports, false, attachments); + ValidateBoreholeImports(workgroupId, boreholeImports, false); // If any validation error occured, return a bad request. if (!ModelState.IsValid) return ValidationProblem(statusCode: (int)HttpStatusCode.BadRequest); @@ -216,21 +209,6 @@ public async Task> UploadFileAsync(int workgroupId, IFormFile await context.Boreholes.AddRangeAsync(boreholes).ConfigureAwait(false); var result = await SaveChangesAsync(() => Ok(boreholes.Count)).ConfigureAwait(false); - // Add attachments to borehole. - if (attachments != null) - { - var boreholeImportsWithAttachments = boreholeImports.Where(x => x.Attachments?.Length > 0).ToList(); - foreach (var boreholeImport in boreholeImportsWithAttachments) - { - var attachmentFileNames = boreholeImport.Attachments?.Split(",").Select(s => s.Replace(" ", "", StringComparison.InvariantCulture)).ToList(); - var attachmentFiles = attachments.Where(x => attachmentFileNames != null && attachmentFileNames.Contains(x.FileName.Replace(" ", "", StringComparison.InvariantCulture))).ToList(); - foreach (var attachmentFile in attachmentFiles) - { - await boreholeFileCloudService.UploadFileAndLinkToBorehole(attachmentFile, boreholeImport.Id).ConfigureAwait(false); - } - } - } - await transaction.CommitAsync().ConfigureAwait(false); return result; } @@ -259,20 +237,19 @@ internal static int GetPrecision(IReaderRow row, string fieldName) return 0; } - private void ValidateBoreholeImports(int workgroupId, List boreholesFromFile, bool isJsonFile, IList? attachments = null) + private void ValidateBoreholeImports(int workgroupId, List boreholesFromFile, bool isJsonFile) { foreach (var borehole in boreholesFromFile.Select((value, index) => (value, index))) { - ValidateBorehole(borehole.value, boreholesFromFile, workgroupId, borehole.index, isJsonFile, attachments); + ValidateBorehole(borehole.value, boreholesFromFile, workgroupId, borehole.index, isJsonFile); } } - private void ValidateBorehole(BoreholeImport borehole, List boreholesFromFile, int workgroupId, int boreholeIndex, bool isJsonFile, IList? attachments) + private void ValidateBorehole(BoreholeImport borehole, List boreholesFromFile, int workgroupId, int boreholeIndex, bool isJsonFile) { ValidateRequiredFields(borehole, boreholeIndex, isJsonFile); ValidateDuplicateInFile(borehole, boreholesFromFile, boreholeIndex, isJsonFile); ValidateDuplicateInDb(borehole, workgroupId, boreholeIndex, isJsonFile); - ValidateAttachments(borehole, attachments, boreholeIndex, isJsonFile); } private void ValidateRequiredFields(BoreholeImport borehole, int processingIndex, bool isJsonFile) @@ -312,26 +289,6 @@ private void ValidateDuplicateInDb(BoreholeImport borehole, int workgroupId, int } } - private void ValidateAttachments(BoreholeImport borehole, IList? attachments, int processingIndex, bool isJsonFile) - { - if (attachments == null || string.IsNullOrEmpty(borehole.Attachments)) return; - - var boreholeFileNames = borehole.Attachments - .Split(",") - .Select(s => s.Trim()) - .Where(s => !string.IsNullOrEmpty(s)) - .ToList(); - - foreach (var boreholeFileName in boreholeFileNames) - { - // Check if the name of any attached file matches the name of the borehole file - if (!attachments.Any(a => a.FileName.Equals(boreholeFileName, StringComparison.OrdinalIgnoreCase))) - { - AddValidationErrorToModelState(processingIndex, $"Attachment file '{boreholeFileName}' not found.", isJsonFile); - } - } - } - internal static bool CompareValuesWithTolerance(double? firstValue, double? secondValue, double tolerance) { if (firstValue == null && secondValue == null) return true; diff --git a/tests/api/Controllers/ImportControllerTest.cs b/tests/api/Controllers/ImportControllerTest.cs index 9e4c93396..417081cee 100644 --- a/tests/api/Controllers/ImportControllerTest.cs +++ b/tests/api/Controllers/ImportControllerTest.cs @@ -489,7 +489,7 @@ public async Task UploadShouldSaveDataToDatabaseAsync() var boreholeCsvFile = GetFormFileByExistingFile("testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -536,7 +536,7 @@ public async Task UploadShouldSaveMinimalDatasetAsync() var boreholeCsvFile = GetFormFileByExistingFile("minimal_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, attachments: null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -575,7 +575,7 @@ public async Task UploadShouldSavePrecisionDatasetAsync() var boreholeCsvFile = GetFormFileByExistingFile("precision_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, attachments: null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -610,74 +610,6 @@ public async Task UploadShouldSavePrecisionDatasetAsync() Assert.AreEqual(4, boreholeWithZeros.PrecisionLocationY); } - [TestMethod] - public async Task UploadShouldSaveBoreholeWithAttachmentsAsync() - { - httpClientFactoryMock - .Setup(cf => cf.CreateClient(It.IsAny())) - .Returns(() => new HttpClient()) - .Verifiable(); - - var boreholeCsvFormFile = GetFormFileByExistingFile("borehole_with_attachments.csv"); - var firstAttachmentFile = GetRandomPDFFile("attachment_1.pdf"); - var secondAttachmentFile = GetRandomFile("attachment_2.txt"); - var thirdAttachmentFile = GetRandomFile("attachment_3.zip"); - var fourthAttachmentFile = GetRandomFile("attachment_4.jpg"); - var fifthAttachmentFile = GetRandomFile("attachment_5.csv"); - var sixthAttachmentFile = GetFormFileByExistingFile("borehole_attachment_1.pdf"); - var seventhAttachmentFile = GetFormFileByExistingFile("borehole_attachment_2.pdf"); - var eighthAttachmentFile = GetFormFileByExistingFile("borehole_attachment_3.csv"); - var ninthAttachmentFile = GetFormFileByExistingFile("borehole_attachment_4.zip"); - var tenthAttachmentFile = GetFormFileByExistingFile("borehole_attachment_5.png"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFormFile, new List() { firstAttachmentFile, secondAttachmentFile, thirdAttachmentFile, fourthAttachmentFile, fifthAttachmentFile, sixthAttachmentFile, seventhAttachmentFile, eighthAttachmentFile, ninthAttachmentFile, tenthAttachmentFile }); - - ActionResultAssert.IsOk(response.Result); - OkObjectResult okResult = (OkObjectResult)response.Result!; - Assert.AreEqual(1, okResult.Value); - - var borehole = GetBoreholesWithIncludes(context.Boreholes).Single(b => b.OriginalName == "ACORNFLEA"); - Assert.AreEqual(10, borehole.BoreholeFiles.Count); - } - - [TestMethod] - public async Task UploadShouldSaveBoreholesWithNotAllHaveAttachmentsAsync() - { - httpClientFactoryMock - .Setup(cf => cf.CreateClient(It.IsAny())) - .Returns(() => new HttpClient()) - .Verifiable(); - - var boreholeCsvFormFile = GetFormFileByExistingFile("boreholes_not_all_have_attachments.csv"); - var firstAttachmentFile = GetFormFileByExistingFile("borehole_attachment_1.pdf"); - var secondAttachmentFile = GetFormFileByExistingFile("borehole_attachment_2.pdf"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFormFile, new List() { firstAttachmentFile, secondAttachmentFile }); - - ActionResultAssert.IsOk(response.Result); - OkObjectResult okResult = (OkObjectResult)response.Result!; - Assert.AreEqual(3, okResult.Value); - } - - [TestMethod] - public async Task UploadShouldSaveBoreholeWithAttachmentFileNamesMixedCaseAsync() - { - httpClientFactoryMock - .Setup(cf => cf.CreateClient(It.IsAny())) - .Returns(() => new HttpClient()) - .Verifiable(); - - var boreholeCsvFormFile = GetFormFileByExistingFile("borehole_with_mixed_case_in_attachments_filenames.csv"); - var firstPdfFormFile = GetFormFileByExistingFile("borehole_attachment_1.pdf"); - var secondPdfFormFile = GetFormFileByExistingFile("borehole_attachment_2.pdf"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFormFile, new List() { firstPdfFormFile, secondPdfFormFile }); - - ActionResultAssert.IsOk(response.Result); - OkObjectResult okResult = (OkObjectResult)response.Result!; - Assert.AreEqual(1, okResult.Value); - } - [TestMethod] public async Task UploadShouldSaveSpecialCharsDatasetAsync() { @@ -688,7 +620,7 @@ public async Task UploadShouldSaveSpecialCharsDatasetAsync() var boreholeCsvFile = GetFormFileByExistingFile("special_chars_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -707,7 +639,7 @@ public async Task UploadWithMissingCoordinatesAsync() { var boreholeCsvFile = GetFormFileByExistingFile("no_coordinates_provided_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); Assert.IsInstanceOfType(response.Result, typeof(ObjectResult)); ObjectResult result = (ObjectResult)response.Result!; @@ -729,7 +661,7 @@ public async Task UploadBoreholeWithLV95CoordinatesAsync() var boreholeCsvFile = GetFormFileByExistingFile("lv95_coordinates_provided_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -758,7 +690,7 @@ public async Task UploadBoreholeWithLV03CoordinatesAsync() var boreholeCsvFile = GetFormFileByExistingFile("lv03_coordinates_provided_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -787,7 +719,7 @@ public async Task UploadBoreholeWithLV03OutOfRangeCoordinatesAsync() var boreholeCsvFile = GetFormFileByExistingFile("lv03_out_of_range_coordinates_provided_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -811,7 +743,7 @@ public async Task UploadEmptyFileShouldReturnError() { var boreholeCsvFile = new FormFile(null, 0, 0, null, "non_existent_file.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsBadRequest(response.Result); BadRequestObjectResult badRequestResult = (BadRequestObjectResult)response.Result!; @@ -823,101 +755,13 @@ public async Task UploadInvalidFileTypeBoreholeCsvShouldReturnError() { var invalidFileTypeBoreholeFile = GetFormFileByContent(fileContent: "This is the content of the file.", fileName: "invalid_file_type.txt"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, invalidFileTypeBoreholeFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, invalidFileTypeBoreholeFile); ActionResultAssert.IsBadRequest(response.Result); BadRequestObjectResult badRequestResult = (BadRequestObjectResult)response.Result!; Assert.AreEqual("Invalid file type for borehole csv.", badRequestResult.Value); } - [TestMethod] - public async Task UploadBoreholeCsvFileWithoutAttachmentsButWithProvidedFilesShouldCreateBorehole() - { - httpClientFactoryMock - .Setup(cf => cf.CreateClient(It.IsAny())) - .Returns(() => new HttpClient()) - .Verifiable(); - - var boreholeCsvFile = GetFormFileByContent(fileContent: "original_name;location_x;location_y\r\nFrank Place;2000000;1000000", fileName: "boreholes.csv"); - var firstPdfFormFile = GetFormFileByExistingFile("borehole_attachment_1.pdf"); - var secondPdfFormFile = GetFormFileByExistingFile("borehole_attachment_2.pdf"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, new List() { firstPdfFormFile, secondPdfFormFile }); - - ActionResultAssert.IsOk(response.Result); - OkObjectResult okResult = (OkObjectResult)response.Result!; - Assert.AreEqual(1, okResult.Value); - } - - [TestMethod] - public async Task UploadBoreholeCsvFileWithAttachmentsLinkedPdfsShouldCreateBorehole() - { - httpClientFactoryMock - .Setup(cf => cf.CreateClient(It.IsAny())) - .Returns(() => new HttpClient()) - .Verifiable(); - - var firstAttachmentFileName = "borehole_attachment_1.pdf"; - var secondAttachmentFileName = "borehole_attachment_2.pdf"; - - var pdfContent = @"original_name;location_x;location_y;attachments -Frank Place;2000000;1000000;borehole_attachment_1.pdf,borehole_attachment_2.pdf"; - var boreholeCsvFile = GetFormFileByContent(fileContent: pdfContent, fileName: "boreholes.csv"); - var firstPdfFormFile = GetFormFileByExistingFile(firstAttachmentFileName); - var secondPdfFormFile = GetFormFileByExistingFile(secondAttachmentFileName); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, new List() { firstPdfFormFile, secondPdfFormFile }); - - ActionResultAssert.IsOk(response.Result); - OkObjectResult okResult = (OkObjectResult)response.Result!; - Assert.AreEqual(1, okResult.Value); - - // Get latest borehole Ids - var latestBoreholeId = context.Boreholes.OrderByDescending(b => b.Id).First().Id; - - var borehole = GetBoreholesWithIncludes(context.Boreholes) - .Single(b => b.Id == latestBoreholeId); - - Assert.AreEqual(borehole.BoreholeFiles.First().File.Name, firstAttachmentFileName); - Assert.AreEqual(borehole.BoreholeFiles.Last().File.Name, secondAttachmentFileName); - Assert.AreEqual(borehole.BoreholeFiles.Count, 2); - } - - [TestMethod] - public async Task UploadBoreholeCsvFileWithNotPresentAttachmentsShouldReturnError() - { - var boreholeCsvFile = GetFormFileByExistingFile("borehole_with_not_present_attachments.csv"); - var firstPdfFormFile = GetFormFileByExistingFile("borehole_attachment_1.pdf"); - var secondPdfFormFile = GetFormFileByExistingFile("borehole_attachment_2.pdf"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, new List() { firstPdfFormFile, secondPdfFormFile }); - - Assert.IsInstanceOfType(response.Result, typeof(ObjectResult)); - ObjectResult result = (ObjectResult)response.Result!; - ActionResultAssert.IsBadRequest(result); - - ValidationProblemDetails problemDetails = (ValidationProblemDetails)result.Value!; - Assert.AreEqual(1, problemDetails.Errors.Count); - - CollectionAssert.AreEquivalent( - new[] { "Attachment file 'is_not_present_in_upload_files.pdf' not found." }, - problemDetails.Errors["Row1"]); - } - - [TestMethod] - public async Task UploadBoreholeCsvFileWithWhiteSpaceInAttachmentFileNameShouldReturnError() - { - var boreholeCsvFile = GetFormFileByExistingFile("borehole_with_not_present_attachments.csv"); - var firstPdfFormFile = GetFormFileByExistingFile("borehole_attachment_1.pdf"); - var whiteSpacePdf = GetFormFileByExistingFile("white space.pdf"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, new List() { firstPdfFormFile, whiteSpacePdf }); - - ActionResultAssert.IsBadRequest(response.Result); - BadRequestObjectResult badRequestResult = (BadRequestObjectResult)response.Result!; - Assert.AreEqual("One or more file name(s) contain a whitespace.", badRequestResult.Value); - } - [TestMethod] public void IsCorrectFileType() { @@ -934,7 +778,7 @@ public void IsCorrectFileType() [TestMethod] public async Task UploadNoFileShouldReturnError() { - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, null, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, null); ActionResultAssert.IsBadRequest(response.Result); BadRequestObjectResult badRequestResult = (BadRequestObjectResult)response.Result!; @@ -946,7 +790,7 @@ public async Task UploadNoDataButRequiredHeadersSetShouldUploadNoBorehole() { var boreholeCsvFile = GetFormFileByExistingFile("no_data_but_required_headers.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; @@ -958,7 +802,7 @@ public async Task UploadMultipleRowsMissingRequiredFieldsShouldReturnError() { var boreholeCsvFile = GetFormFileByExistingFile("multiple_rows_missing_required_attributes_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); Assert.IsInstanceOfType(response.Result, typeof(ObjectResult)); ObjectResult result = (ObjectResult)response.Result!; @@ -983,7 +827,7 @@ public async Task UploadRequiredHeadersMissingShouldReturnError() { var boreholeCsvFile = GetFormFileByExistingFile("missing_required_headers_testdata.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); Assert.IsInstanceOfType(response.Result, typeof(ObjectResult)); var result = (ObjectResult)response.Result!; @@ -1100,25 +944,6 @@ public async Task UploadDuplicateBoreholesInDbButDifferentWorkgroupShouldUploadB Assert.AreEqual(2, okResult.Value); } - [TestMethod] - public async Task UploadWithAttachmentToLargeShouldThrowError() - { - var minBoreholeId = context.Boreholes.Min(b => b.Id); - var boreholeCsvFile = GetRandomFile("borehoel.csv"); - - long targetSizeInBytes = 201 * 1024 * 1024; // 201MB - byte[] content = new byte[targetSizeInBytes]; - var stream = new MemoryStream(content); - - var attachment = new FormFile(stream, 0, stream.Length, "file", "dummy.txt"); - - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, new[] { attachment }); - - ActionResultAssert.IsBadRequest(response.Result); - BadRequestObjectResult badRequestResult = (BadRequestObjectResult)response.Result!; - Assert.AreEqual($"One or more attachment exceed maximum file size of 200 Mb.", badRequestResult.Value); - } - [TestMethod] public async Task UploadWithMaxValidationErrorsExceededShouldReturnError() { @@ -1156,7 +981,7 @@ public async Task UploadShouldIgnoreLocationFields() var boreholeCsvFile = GetFormFileByExistingFile("borehole_and_location_data.csv"); - ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile, null); + ActionResult response = await controller.UploadFileAsync(workgroupId: 1, boreholeCsvFile); ActionResultAssert.IsOk(response.Result); OkObjectResult okResult = (OkObjectResult)response.Result!; diff --git a/tests/api/TestData/borehole_attachment_1.pdf b/tests/api/TestData/borehole_attachment_1.pdf deleted file mode 100644 index ca3c36c8d..000000000 Binary files a/tests/api/TestData/borehole_attachment_1.pdf and /dev/null differ diff --git a/tests/api/TestData/borehole_attachment_2.pdf b/tests/api/TestData/borehole_attachment_2.pdf deleted file mode 100644 index 5cecb0fa6..000000000 Binary files a/tests/api/TestData/borehole_attachment_2.pdf and /dev/null differ diff --git a/tests/api/TestData/borehole_attachment_3.csv b/tests/api/TestData/borehole_attachment_3.csv deleted file mode 100644 index 133272495..000000000 --- a/tests/api/TestData/borehole_attachment_3.csv +++ /dev/null @@ -1,2 +0,0 @@ -id;name; -1;ACORNFLEA; diff --git a/tests/api/TestData/borehole_attachment_4.zip b/tests/api/TestData/borehole_attachment_4.zip deleted file mode 100644 index 29849af84..000000000 Binary files a/tests/api/TestData/borehole_attachment_4.zip and /dev/null differ diff --git a/tests/api/TestData/borehole_attachment_5.png b/tests/api/TestData/borehole_attachment_5.png deleted file mode 100644 index a971b2355..000000000 Binary files a/tests/api/TestData/borehole_attachment_5.png and /dev/null differ diff --git a/tests/api/TestData/borehole_attachment_with_wrong_extension.txt b/tests/api/TestData/borehole_attachment_with_wrong_extension.txt deleted file mode 100644 index f2c43b62e..000000000 Binary files a/tests/api/TestData/borehole_attachment_with_wrong_extension.txt and /dev/null differ diff --git a/tests/api/TestData/borehole_with_attachments.csv b/tests/api/TestData/borehole_with_attachments.csv deleted file mode 100644 index 75b26ca6f..000000000 --- a/tests/api/TestData/borehole_with_attachments.csv +++ /dev/null @@ -1,2 +0,0 @@ -original_name;location_x;location_y;attachments -ACORNFLEA;0;0;attachment_1.pdf,attachment_2.txt,attachment_3.zip,attachment_4.jpg,attachment_5.csv,borehole_attachment_1.pdf,borehole_attachment_2.pdf,borehole_attachment_3.csv,borehole_attachment_4.zip,borehole_attachment_5.png diff --git a/tests/api/TestData/borehole_with_mixed_case_in_attachments_filenames.csv b/tests/api/TestData/borehole_with_mixed_case_in_attachments_filenames.csv deleted file mode 100644 index ab830ee9f..000000000 --- a/tests/api/TestData/borehole_with_mixed_case_in_attachments_filenames.csv +++ /dev/null @@ -1,2 +0,0 @@ -original_name;location_x;location_y;attachments -ACORNFLEA;0;0;Borehole_Attachment_1.pdf,borehole_attachment_2.pdf diff --git a/tests/api/TestData/borehole_with_not_present_attachments.csv b/tests/api/TestData/borehole_with_not_present_attachments.csv deleted file mode 100644 index 65fd39745..000000000 --- a/tests/api/TestData/borehole_with_not_present_attachments.csv +++ /dev/null @@ -1,2 +0,0 @@ -original_name;location_x;location_y;attachments -ACORNFLEA;0;0;borehole_attachment_1.pdf,is_not_present_in_upload_files.pdf diff --git a/tests/api/TestData/boreholes_not_all_have_attachments.csv b/tests/api/TestData/boreholes_not_all_have_attachments.csv deleted file mode 100644 index fbd3fb704..000000000 --- a/tests/api/TestData/boreholes_not_all_have_attachments.csv +++ /dev/null @@ -1,4 +0,0 @@ -original_name;location_x;location_y;attachments -ACORNFLEA;2000000;1000000;borehole_attachment_1.pdf,borehole_attachment_2.pdf -BERRYSNAIL;2000010;1000010; -BLUEBIRDY;2000020;1000020;;