File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,9 @@ defmodule Meadow.Data.FileSets do
300
300
def pyramid_uri_for ( % FileSet { core_metadata: % { mime_type: "audio/" <> _thing } } ) ,
301
301
do: nil
302
302
303
+ def pyramid_uri_for ( % FileSet { core_metadata: % { mime_type: "application/pdf" } } ) ,
304
+ do: nil
305
+
303
306
def pyramid_uri_for ( % FileSet { } = file_set ) , do: pyramid_uri_for ( file_set . id )
304
307
305
308
def pyramid_uri_for ( file_set_id ) do
Original file line number Diff line number Diff line change @@ -232,4 +232,37 @@ defmodule Meadow.Data.PreservationCheckWriterTest do
232
232
PreservationCheckWriter . generate_report ( @ report_filename )
233
233
end
234
234
end
235
+
236
+ describe "generate_report/1 with pdf (X) files" do
237
+ setup do
238
+ video_work = work_fixture ( % { work_type: % { id: "VIDEO" , scheme: "work_type" } } )
239
+
240
+ video_access_file_set =
241
+ file_set_fixture ( % {
242
+ work_id: video_work . id ,
243
+ accession_number: "101113" ,
244
+ role: % { id: "X" , scheme: "FILE_SET_ROLE" } ,
245
+ core_metadata: % {
246
+ digests: % {
247
+ "sha256" => @ sha256 ,
248
+ "sha1" => @ sha1 ,
249
+ "md5" => @ md5
250
+ } ,
251
+ location: "s3://#{ @ preservation_bucket } /#{ Pairtree . preservation_path ( @ sha256 ) } " ,
252
+ mime_type: "application/pdf" ,
253
+ original_filename: "test.pdf"
254
+ }
255
+ } )
256
+
257
+ { :ok , file_set: pdf_aux_file_set }
258
+ end
259
+
260
+ @ describetag s3: [ @ preservation_fixture ]
261
+ test "does not record an error if pdf aux file set pyramids are missing" , % {
262
+ file_set: _file_set
263
+ } do
264
+ assert { :ok , "s3://#{ @ preservation_check_bucket } /pres_check.csv" , 0 } =
265
+ PreservationCheckWriter . generate_report ( @ report_filename )
266
+ end
267
+ end
235
268
end
You can’t perform that action at this time.
0 commit comments