Skip to content

Commit

Permalink
Populate XSD path in config
Browse files Browse the repository at this point in the history
  • Loading branch information
mcantelon committed Nov 8, 2024
1 parent 851d39e commit 36b2c31
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions internal/workflow/processing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ func (s *ProcessingWorkflowTestSuite) TestAutoApprovedAIP() {
Storage: storage.Config{
DefaultPermanentLocationID: locationID,
},
ValidatePREMIS: premis.Config{Enabled: true},
ValidatePREMIS: premis.Config{
Enabled: true,
XSDPath: "/home/enduro/premis.xsd",
},
}
s.SetupWorkflowTest(cfg)

Expand Down Expand Up @@ -523,7 +526,7 @@ func (s *ProcessingWorkflowTestSuite) TestAutoApprovedAIP() {
).Return(valPREMISTaskID, nil)

s.env.OnActivity(xmlvalidate.Name, sessionCtx,
&xmlvalidate.Params{XMLPath: filepath.Join(transferPath, "metadata", "premis.xml"), XSDPath: ""},
&xmlvalidate.Params{XMLPath: filepath.Join(transferPath, "metadata", "premis.xml"), XSDPath: "/home/enduro/premis.xsd"},
).Return(
&xmlvalidate.Result{Failures: []string{}}, nil,
)
Expand Down Expand Up @@ -628,10 +631,13 @@ func (s *ProcessingWorkflowTestSuite) TestAMWorkflow() {
sessionCtx := mock.AnythingOfType("*context.timerCtx")

cfg := config.Configuration{
A3m: a3m.Config{ShareDir: s.CreateTransferDir()},
Preservation: pres.Config{TaskQueue: temporal.AmWorkerTaskQueue},
Storage: storage.Config{DefaultPermanentLocationID: amssLocationID},
ValidatePREMIS: premis.Config{Enabled: true},
A3m: a3m.Config{ShareDir: s.CreateTransferDir()},
Preservation: pres.Config{TaskQueue: temporal.AmWorkerTaskQueue},
Storage: storage.Config{DefaultPermanentLocationID: amssLocationID},
ValidatePREMIS: premis.Config{
Enabled: true,
XSDPath: "/home/enduro/premis.xsd",
},
}
s.SetupWorkflowTest(cfg)

Expand Down Expand Up @@ -696,7 +702,7 @@ func (s *ProcessingWorkflowTestSuite) TestAMWorkflow() {
).Return(valPREMISTaskID, nil)

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

0 comments on commit 36b2c31

Please sign in to comment.