From dc134242a96be1ae83f55361f30a6c094bfe73c3 Mon Sep 17 00:00:00 2001 From: Samuel Sciolla Date: Tue, 6 Aug 2024 16:22:01 -0400 Subject: [PATCH] Set detect_hidden default in create_courier; reorder some more arguments --- test/test_bag_courier.rb | 14 +++++++------- test/test_dispatcher.rb | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/test_bag_courier.rb b/test/test_bag_courier.rb index 1beb032..0bd87f8 100644 --- a/test/test_bag_courier.rb +++ b/test/test_bag_courier.rb @@ -126,7 +126,7 @@ def setup def create_courier( dry_run:, target_client:, - detect_hidden:, + detect_hidden: true, validator: @validator, remove_export: false ) @@ -135,19 +135,19 @@ def create_courier( bag_info: @bag_info, tags: [@aptrust_info], data_transfer: @data_transfer, + detect_hidden: detect_hidden, working_dir: @prep_path, export_dir: @export_path, remove_export: remove_export, dry_run: dry_run, status_event_repo: @status_event_repo, target_client: target_client, - validator: validator, - detect_hidden: detect_hidden + validator: validator ) end def test_deliver_with_dry_run_false - courier = create_courier(dry_run: false, detect_hidden: @detect_hidden, target_client: @mock_target_client) + courier = create_courier(dry_run: false, target_client: @mock_target_client) expected_tar_file_path = File.join(@export_path, @bag_id.to_s + ".tar") @mock_target_client.expect(:remote_text, "AWS S3 remote location in bucket fake") @mock_target_client.expect(:send_file, nil, local_file_path: expected_tar_file_path) @@ -173,7 +173,7 @@ def test_deliver_with_dry_run_false end def test_deliver_with_dry_run - courier = create_courier(dry_run: true, detect_hidden: @detect_hidden, target_client: @mock_target_client) + courier = create_courier(dry_run: true, target_client: @mock_target_client) courier.deliver @mock_target_client.verify @@ -189,7 +189,7 @@ def test_deliver_with_dry_run end def test_deliver_when_deposit_raises_error - courier = create_courier(dry_run: false, detect_hidden: @detect_hidden, target_client: @aptrust_target_client) + courier = create_courier(dry_run: false, target_client: @aptrust_target_client) raise_error = proc { raise RemoteClient::RemoteClientError, "specific details" } @aptrust_target_client.stub :send_file, raise_error do courier.deliver @@ -203,7 +203,7 @@ def test_deliver_when_deposit_raises_error end def test_deliver_with_remove_export - courier = create_courier(dry_run: false, detect_hidden: @detect_hidden, target_client: @mock_target_client, remove_export: true) + courier = create_courier(dry_run: false, target_client: @mock_target_client, remove_export: true) expected_tar_file_path = File.join(@export_path, @bag_id.to_s + ".tar") @mock_target_client.expect(:remote_text, "AWS S3 remote location in bucket fake") @mock_target_client.expect(:send_file, nil, local_file_path: expected_tar_file_path) diff --git a/test/test_dispatcher.rb b/test/test_dispatcher.rb index 566ad4d..1770740 100644 --- a/test/test_dispatcher.rb +++ b/test/test_dispatcher.rb @@ -50,10 +50,10 @@ def setup repository: repository, context: "some-context", extra_bag_info_data: {"something_extra" => true}, + detect_hidden: @detect_hidden, target_client: target_client, bag_repo: BagRepository::BagDatabaseRepository.new, - status_event_repo: StatusEventRepository::StatusEventDatabaseRepository.new, - detect_hidden: @detect_hidden + status_event_repo: StatusEventRepository::StatusEventDatabaseRepository.new ) @bag_identifier = "some-repo.some-context-00001"