diff --git a/lib/tasks/import_address_from_csv.rake b/lib/tasks/import_address_from_csv.rake index 00929deb4..e6c44872b 100644 --- a/lib/tasks/import_address_from_csv.rake +++ b/lib/tasks/import_address_from_csv.rake @@ -5,7 +5,7 @@ namespace :data_import do raise "Usage: rake data_import:import_lettings_addresses_from_csv['csv_file_name']" if file_name.blank? - s3_service = Storage::S3Service.new(Configuration::EnvConfigurationService.new, ENV["IMPORT_PAAS_INSTANCE"]) + s3_service = Storage::S3Service.new(Configuration::EnvConfigurationService.new, ENV["CSV_DOWNLOAD_PAAS_INSTANCE"]) file_io = s3_service.get_file_io(file_name) file_io.set_encoding_by_bom addresses_csv = CSV.parse(file_io, headers: true) @@ -69,7 +69,7 @@ namespace :data_import do raise "Usage: rake data_import:import_sales_addresses_from_csv['csv_file_name']" if file_name.blank? - s3_service = Storage::S3Service.new(Configuration::EnvConfigurationService.new, ENV["IMPORT_PAAS_INSTANCE"]) + s3_service = Storage::S3Service.new(Configuration::EnvConfigurationService.new, ENV["CSV_DOWNLOAD_PAAS_INSTANCE"]) file_io = s3_service.get_file_io(file_name) file_io.set_encoding_by_bom addresses_csv = CSV.parse(file_io, headers: true) diff --git a/spec/lib/tasks/correct_address_from_csv_spec.rb b/spec/lib/tasks/correct_address_from_csv_spec.rb index c53cf2be4..0e3b4be78 100644 --- a/spec/lib/tasks/correct_address_from_csv_spec.rb +++ b/spec/lib/tasks/correct_address_from_csv_spec.rb @@ -13,7 +13,7 @@ RSpec.describe "data_import" do allow(Storage::S3Service).to receive(:new).and_return(storage_service) allow(Configuration::EnvConfigurationService).to receive(:new).and_return(env_config_service) allow(ENV).to receive(:[]) - allow(ENV).to receive(:[]).with("IMPORT_PAAS_INSTANCE").and_return(instance_name) + allow(ENV).to receive(:[]).with("CSV_DOWNLOAD_PAAS_INSTANCE").and_return(instance_name) allow(ENV).to receive(:[]).with("VCAP_SERVICES").and_return("dummy") WebMock.stub_request(:get, /api\.postcodes\.io/)