Skip to content

Commit

Permalink
More adding of detail to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcantelon committed Nov 5, 2024
1 parent 894666f commit a5e2760
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions internal/workflow/processing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1587,15 +1587,42 @@ func (s *ProcessingWorkflowTestSuite) TestFailedPIPAM() {
s.env.OnActivity(bagcreate.Name, sessionCtx, &bagcreate.Params{SourcePath: extractPath}).
Return(&bagcreate.Result{BagPath: extractPath}, nil)

s.env.OnActivity(createPreservationTaskLocalActivity, mock.Anything, mock.Anything, mock.Anything).
Return(0, nil)
s.env.OnActivity(
createPreservationTaskLocalActivity,
ctx,
&createPreservationTaskLocalActivityParams{
PkgSvc: pkgsvc,
RNG: s.workflow.rng,
PreservationTask: datatypes.PreservationTask{
Name: "Validate PREMIS",
Status: enums.PreservationTaskStatusInProgress,
StartedAt: sql.NullTime{
Time: startTime,
Valid: true,
},
PreservationActionID: 0,
},
},
).Return(0, nil)

s.env.OnActivity(
xmlvalidate.Name,
sessionCtx,
&xmlvalidate.Params{XMLPath: filepath.Join(extractPath, "data/metadata/premis.xml"), XSDPath: ""},
).Return(&xmlvalidate.Result{Failures: []string{}}, nil)

s.env.OnActivity(
completePreservationTaskLocalActivity,
ctx,
pkgsvc,
&completePreservationTaskLocalActivityParams{
ID: 0,
Status: enums.PreservationTaskStatusDone,
CompletedAt: startTime,
Note: ref.New("PREMIS is valid"),
},
).Return(&completePreservationTaskLocalActivityResult{}, nil)

s.env.OnActivity(completePreservationTaskLocalActivity, mock.Anything, mock.Anything, mock.Anything).
Return(nil, nil)

Expand Down

0 comments on commit a5e2760

Please sign in to comment.