Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /spec/models/concerns/partitioned_table_spec.rb
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/models/concerns/partitioned_table_spec.rb')
-rw-r--r--spec/models/concerns/partitioned_table_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/models/concerns/partitioned_table_spec.rb b/spec/models/concerns/partitioned_table_spec.rb
index 3343b273ba2..c37fb81a1cf 100644
--- a/spec/models/concerns/partitioned_table_spec.rb
+++ b/spec/models/concerns/partitioned_table_spec.rb
@@ -14,6 +14,16 @@ RSpec.describe PartitionedTable do
end
end
+ context 'with keyword arguments passed to the strategy' do
+ subject { my_class.partitioned_by(key, strategy: :monthly, retain_for: 3.months) }
+
+ it 'passes the keyword arguments to the strategy' do
+ expect(Gitlab::Database::Partitioning::MonthlyStrategy).to receive(:new).with(my_class, key, retain_for: 3.months).and_call_original
+
+ subject
+ end
+ end
+
it 'assigns the MonthlyStrategy as the partitioning strategy' do
subject
@@ -27,7 +37,7 @@ RSpec.describe PartitionedTable do
end
it 'registers itself with the PartitionCreator' do
- expect(Gitlab::Database::Partitioning::PartitionCreator).to receive(:register).with(my_class)
+ expect(Gitlab::Database::Partitioning::PartitionManager).to receive(:register).with(my_class)
subject
end