Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Use gocloud.dev/blob/memblob in test
Browse files Browse the repository at this point in the history
  • Loading branch information
jraddaoui committed Dec 1, 2023
1 parent 74115ea commit 4d1434c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
28 changes: 0 additions & 28 deletions internal/watcher/fake/mock_bucket.go

This file was deleted.

6 changes: 3 additions & 3 deletions internal/workflow/processing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
temporalsdk_testsuite "go.temporal.io/sdk/testsuite"
temporalsdk_worker "go.temporal.io/sdk/worker"
"go.uber.org/mock/gomock"
"gocloud.dev/blob/memblob"
"gotest.tools/v3/assert"

"github.com/artefactual-sdps/enduro/internal/a3m"
Expand Down Expand Up @@ -53,8 +54,6 @@ func (s *ProcessingWorkflowTestSuite) SetupWorkflowTest(taskQueue string) {
pkgsvc := packagefake.NewMockService(ctrl)
wsvc := watcherfake.NewMockService(ctrl)
sftpc := sftp_fake.NewMockClient(ctrl)
failedBucketTransfers := watcherfake.OpenTestFileBucket(s.T())
failedBucketSips := watcherfake.OpenTestFileBucket(s.T())

s.env.RegisterActivityWithOptions(activities.NewDownloadActivity(wsvc).Execute, temporalsdk_activity.RegisterOptions{Name: activities.DownloadActivityName})
s.env.RegisterActivityWithOptions(activities.NewBundleActivity(wsvc).Execute, temporalsdk_activity.RegisterOptions{Name: activities.BundleActivityName})
Expand All @@ -65,13 +64,14 @@ func (s *ProcessingWorkflowTestSuite) SetupWorkflowTest(taskQueue string) {
s.env.RegisterActivityWithOptions(activities.NewRejectPackageActivity(nil).Execute, temporalsdk_activity.RegisterOptions{Name: activities.RejectPackageActivityName})
s.env.RegisterActivityWithOptions(activities.NewCleanUpActivity().Execute, temporalsdk_activity.RegisterOptions{Name: activities.CleanUpActivityName})
s.env.RegisterActivityWithOptions(activities.NewDeleteOriginalActivity(wsvc).Execute, temporalsdk_activity.RegisterOptions{Name: activities.DeleteOriginalActivityName})

// SFA-preprocessing activities.
s.env.RegisterActivityWithOptions(sfa_activities.NewExtractPackage().Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.ExtractPackageName})
s.env.RegisterActivityWithOptions(sfa_activities.NewCheckSipStructure().Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.CheckSipStructureName})
s.env.RegisterActivityWithOptions(sfa_activities.NewAllowedFileFormatsActivity().Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.AllowedFileFormatsName})
s.env.RegisterActivityWithOptions(sfa_activities.NewMetadataValidationActivity().Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.MetadataValidationName})
s.env.RegisterActivityWithOptions(sfa_activities.NewSipCreationActivity().Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.SipCreationName})
s.env.RegisterActivityWithOptions(sfa_activities.NewSendToFailedBuckeActivity(failedBucketTransfers, failedBucketSips).Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.SendToFailedBucketName})
s.env.RegisterActivityWithOptions(sfa_activities.NewSendToFailedBuckeActivity(memblob.OpenBucket(nil), memblob.OpenBucket(nil)).Execute, temporalsdk_activity.RegisterOptions{Name: sfa_activities.SendToFailedBucketName})

// Archivematica activities
s.env.RegisterActivityWithOptions(
Expand Down

0 comments on commit 4d1434c

Please sign in to comment.