diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-28 15:08:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-28 15:08:03 +0000 |
commit | 59469a17821eda8a34d08b1e46584e902d1e963a (patch) | |
tree | 504eb7237ea7cadb589e0791fa243f7bf93237a7 /spec/tasks | |
parent | e2b92514e3def8074c0855100632ebb9935d2a19 (diff) | |
download | gitlab-ce-59469a17821eda8a34d08b1e46584e902d1e963a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/cache/clear/redis_spec.rb | 2 | ||||
-rw-r--r-- | spec/tasks/gitlab/db_rake_spec.rb | 41 |
2 files changed, 0 insertions, 43 deletions
diff --git a/spec/tasks/cache/clear/redis_spec.rb b/spec/tasks/cache/clear/redis_spec.rb index 64ed83c649b..e8c62bbe124 100644 --- a/spec/tasks/cache/clear/redis_spec.rb +++ b/spec/tasks/cache/clear/redis_spec.rb @@ -36,8 +36,6 @@ RSpec.describe 'clearing redis cache', :clean_gitlab_redis_cache, :silence_stdou let(:cache) { Gitlab::RepositorySetCache.new(repository) } before do - pending "Enable as part of https://gitlab.com/gitlab-org/gitlab/-/issues/331319" - cache.write(:foo, [:bar]) end diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb index 08ca6c32b49..f948f2627d0 100644 --- a/spec/tasks/gitlab/db_rake_spec.rb +++ b/spec/tasks/gitlab/db_rake_spec.rb @@ -146,47 +146,6 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout do end end - describe 'load_custom_structure' do - let_it_be(:db_config) { Rails.application.config_for(:database) } - let_it_be(:custom_load_task) { 'gitlab:db:load_custom_structure' } - let_it_be(:custom_filepath) { Pathname.new('db/directory') } - - it 'uses the psql command to load the custom structure file' do - expect(Gitlab::Database::CustomStructure).to receive(:custom_dump_filepath).and_return(custom_filepath) - - expect(Kernel).to receive(:system) - .with('psql', any_args, custom_filepath.to_path, db_config['database']).and_return(true) - - run_rake_task(custom_load_task) - end - - it 'raises an error when the call to the psql command fails' do - expect(Gitlab::Database::CustomStructure).to receive(:custom_dump_filepath).and_return(custom_filepath) - - expect(Kernel).to receive(:system) - .with('psql', any_args, custom_filepath.to_path, db_config['database']).and_return(nil) - - expect { run_rake_task(custom_load_task) }.to raise_error(/failed to execute:\s*psql/) - end - end - - describe 'dump_custom_structure' do - let_it_be(:test_task_name) { 'gitlab:db:_test_multiple_task_executions' } - let_it_be(:custom_dump_task) { 'gitlab:db:dump_custom_structure' } - - after do - Rake::Task[test_task_name].clear if Rake::Task.task_defined?(test_task_name) - end - - it 'can be executed multiple times within another rake task' do - expect_multiple_executions_of_task(test_task_name, custom_dump_task) do - expect_next_instance_of(Gitlab::Database::CustomStructure) do |custom_structure| - expect(custom_structure).to receive(:dump) - end - end - end - end - describe 'drop_tables' do subject { run_rake_task('gitlab:db:drop_tables') } |