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 17, 2024
1 parent 48f1181 commit 8a476d5
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 @@ -229,8 +229,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, "premis.xml creation successful")
}

// 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: "premis.xml creation successful",
Outcome: enums.EventOutcomeSuccess,
StartedAt: testTime,
CompletedAt: testTime,
},
{
Name: "Restructure SIP",
Message: "SIP has been restructured",
Expand Down

0 comments on commit 8a476d5

Please sign in to comment.