Remove tasks to upgrade to version 2.2

Note that, while we're no longer including them as part of the
`execute_release_2.2.0_tasks` task, we're keeping the tasks to remove
duplicate poll voters and poll options just in case there are some
unexpected issues when adding a unique database index while upgrading to
version 2.3.0. We'll remove them in version 2.4.0.
This commit is contained in:
Javi Martín
2024-12-09 15:02:18 +01:00
parent 8d1a848e60
commit d7c373509a
3 changed files with 3 additions and 45 deletions

View File

@@ -1,27 +0,0 @@
require "rails_helper"
describe "rake db:mask_ips" do
before { Rake::Task["db:mask_ips"].reenable }
it "mask IPs on all tenants" do
create(:visit, ip: "1.1.1.1")
create(:visit, ip: "1.1.1.2")
create(:visit, ip: "1.1.2.2")
create(:tenant, schema: "myhometown")
Tenant.switch("myhometown") do
create(:visit, ip: "1.1.1.1")
create(:visit, ip: "1.1.1.2")
create(:visit, ip: "1.1.3.3")
end
Rake.application.invoke_task("db:mask_ips")
expect(Visit.pluck(:ip)).to match_array %w[1.1.1.0 1.1.1.0 1.1.2.0]
Tenant.switch("myhometown") do
expect(Visit.pluck(:ip)).to match_array %w[1.1.1.0 1.1.1.0 1.1.3.0]
end
end
end