diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-23 18:11:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-23 18:11:47 +0300 |
commit | 750a63ac4cc7acbecff3b8d22232cb1c15af34fb (patch) | |
tree | c61c790252548a3909466e3dcfe2a98208764fd3 /spec/tasks | |
parent | f94cd1d0fb5c0b42ec12a8db02ec90227bb98879 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/gitlab/db_rake_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb index 8f5654d32a9..7dd8adae04d 100644 --- a/spec/tasks/gitlab/db_rake_spec.rb +++ b/spec/tasks/gitlab/db_rake_spec.rb @@ -1200,6 +1200,8 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout, feature_categor let(:config_hash) { { username: 'foo' } } before do + skip_if_shared_database(:ci) + allow(Rake::Task['db:drop']).to receive(:invoke) allow(Rake::Task['db:create']).to receive(:invoke) allow(ActiveRecord::Base).to receive(:configurations).and_return(configurations) @@ -1211,7 +1213,7 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout, feature_categor it 'migrate as nonsuperuser check with default username' do expect(config_hash).to receive(:merge).with({ username: 'gitlab' }).and_call_original expect(Gitlab::Database).to receive(:check_for_non_superuser) - expect(Rake::Task['db:migrate']).to receive(:invoke) + expect(Rake::Task['db:migrate:main']).to receive(:invoke) run_rake_task('gitlab:db:reset_as_non_superuser') end @@ -1219,7 +1221,7 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout, feature_categor it 'migrate as nonsuperuser check with specified username' do expect(config_hash).to receive(:merge).with({ username: 'foo' }).and_call_original expect(Gitlab::Database).to receive(:check_for_non_superuser) - expect(Rake::Task['db:migrate']).to receive(:invoke) + expect(Rake::Task['db:migrate:main']).to receive(:invoke) run_rake_task('gitlab:db:reset_as_non_superuser', '[foo]') end |