Skip to content

Commit

Permalink
Add PREMIS creation preservation task (#73)
Browse files Browse the repository at this point in the history
[skip codecov]
  • Loading branch information
mcantelon committed Nov 18, 2024
1 parent 2cf4cdc commit b516079
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/workflow/preprocessing.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ func (w *PreprocessingWorkflow) Execute(
return result, nil
}

// Write PREMIS XML.
ev = result.newEvent(ctx, "Create premis.xml")
if e = writePREMISFile(ctx, identifySIP.SIP); e != nil {
return nil, e
result.systemError(ctx, e, ev, "premis.xml creation has failed")
} else {
ev.Succeed(ctx, "Created a premis.xml and stored in metadata directory")
}

// Re-structure SIP.
Expand Down
7 changes: 7 additions & 0 deletions internal/workflow/preprocessing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,13 @@ func (s *PreprocessingTestSuite) TestPreprocessingWorkflowSuccess() {
StartedAt: testTime,
CompletedAt: testTime,
},
{
Name: "Create premis.xml",
Message: "Created a premis.xml and stored in metadata directory",
Outcome: enums.EventOutcomeSuccess,
StartedAt: testTime,
CompletedAt: testTime,
},
{
Name: "Restructure SIP",
Message: "SIP has been restructured",
Expand Down

0 comments on commit b516079

Please sign in to comment.