github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/tests/system/scalability/recipients.rb (about) 1 require_relative './base_tests.rb' 2 3 MAX_RECIPIENTS = 50 4 N_FILES_INIT = 10 5 6 # This test creates a sharing with many recipients 7 8 # Create the instances 9 names = Array.new(MAX_RECIPIENTS + 1) { Faker::Internet.domain_word } 10 11 insts = create_instances names 12 inst_a = insts[0] 13 14 # Create the hierarchy to share 15 folder = Folder.create inst_a 16 create_hierarchy inst_a, folder, N_FILES_INIT 17 18 # Create the sharing 19 create_sharing insts, folder 20 21 # Check everything went well for each recipient 22 da = File.join Helpers.current_dir, inst_a.domain, folder.name 23 recipients = insts.drop 1 24 rec_path = "/#{Helpers::SHARED_WITH_ME}/#{folder.name}" 25 recipients.each do |recipient| 26 drec = File.join Helpers.current_dir, recipient.domain, rec_path 27 poll_for_diff da, drec 28 end