Skip to content

Commit

Permalink
Updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jayamala17 committed Aug 5, 2024
1 parent a50af3d commit 63e4c9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/test_bag_courier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,16 @@ def setup
@package_path = File.join(@test_dir_path, "package")
FileUtils.rm_r(@test_dir_path) if File.exist?(@test_dir_path)
FileUtils.mkdir_p([@test_dir_path, @prep_path, @export_path, @package_path])
innerbag = BagAdapter::BagAdapter.new(@package_path)
@detect_hidden = true
innerbag = BagAdapter::BagAdapter.new(@package_path, @detect_hidden)

File.write(
File.join(@package_path, "data", "something.txt"),
"Something to be preserved"
)
innerbag.add_bag_info({})
innerbag.add_manifests
@validator = InnerBagValidator.new("package")
@validator = InnerBagValidator.new("package", @detect_hidden)
# Set up remote-related objects
@data_transfer = DataTransfer::RemoteClientDataTransfer.new(
remote_client: RemoteClient::FileSystemRemoteClient.new(
Expand Down
6 changes: 4 additions & 2 deletions test/test_dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

class APTrustDispatcherTest < SequelTestCase
def setup
@detect_hidden = true
workflow_settings = Config::WorkflowConfig.new(
working_dir: "/prep",
export_dir: "/export",
Expand Down Expand Up @@ -51,7 +52,8 @@ def setup
extra_bag_info_data: {"something_extra" => true},
target_client: target_client,
bag_repo: BagRepository::BagDatabaseRepository.new,
status_event_repo: StatusEventRepository::StatusEventDatabaseRepository.new
status_event_repo: StatusEventRepository::StatusEventDatabaseRepository.new,
detect_hidden: @detect_hidden
)

@bag_identifier = "some-repo.some-context-00001"
Expand All @@ -69,7 +71,7 @@ def create_courier_with_dispatch
remote_client: RemoteClient::FileSystemRemoteClient.new("/some/path"),
remote_path: "some_subdir"
),
validator: InnerBagValidator.new("some-inner-bag-name")
validator: InnerBagValidator.new("some-inner-bag-name", @detect_hidden)
)
end

Expand Down

0 comments on commit 63e4c9e

Please sign in to comment.