Commit 86860616 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'ml-verify-storage-move-in-separate-praefect-container' into 'master'

Verify storage move in separate praefect container

See merge request gitlab-org/gitlab!45100
parents d049e9e9 91232fba
...@@ -387,7 +387,7 @@ module QA ...@@ -387,7 +387,7 @@ module QA
end end
def verify_storage_move_to_praefect(repo_path, virtual_storage) def verify_storage_move_to_praefect(repo_path, virtual_storage)
wait_until_shell_command("docker exec #{@gitlab} bash -c 'tail -n 50 /var/log/gitlab/praefect/current'") do |line| wait_until_shell_command("docker exec #{@praefect} bash -c 'tail -n 50 /var/log/gitlab/praefect/current'") do |line|
log = JSON.parse(line) log = JSON.parse(line)
log['grpc.method'] == 'ReplicateRepository' && log['virtual_storage'] == virtual_storage && log['relative_path'] == repo_path log['grpc.method'] == 'ReplicateRepository' && log['virtual_storage'] == virtual_storage && log['relative_path'] == repo_path
......
...@@ -4,7 +4,6 @@ module QA ...@@ -4,7 +4,6 @@ module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'Changing Gitaly repository storage', :requires_admin do describe 'Changing Gitaly repository storage', :requires_admin do
praefect_manager = Service::PraefectManager.new praefect_manager = Service::PraefectManager.new
praefect_manager.gitlab = 'gitlab'
shared_examples 'repository storage move' do shared_examples 'repository storage move' do
it 'confirms a `finished` status after moving project repository storage' do it 'confirms a `finished` status after moving project repository storage' do
...@@ -28,7 +27,6 @@ module QA ...@@ -28,7 +27,6 @@ module QA
context 'when moving from one Gitaly storage to another', :orchestrated, :repository_storage, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/973' do context 'when moving from one Gitaly storage to another', :orchestrated, :repository_storage, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/973' do
let(:source_storage) { { type: :gitaly, name: 'default' } } let(:source_storage) { { type: :gitaly, name: 'default' } }
let(:destination_storage) { { type: :gitaly, name: QA::Runtime::Env.additional_repository_storage } } let(:destination_storage) { { type: :gitaly, name: QA::Runtime::Env.additional_repository_storage } }
let(:project) do let(:project) do
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
project.name = 'repo-storage-move-status' project.name = 'repo-storage-move-status'
...@@ -37,6 +35,10 @@ module QA ...@@ -37,6 +35,10 @@ module QA
end end
end end
before do
praefect_manager.gitlab = 'gitlab'
end
it_behaves_like 'repository storage move' it_behaves_like 'repository storage move'
end end
...@@ -46,7 +48,6 @@ module QA ...@@ -46,7 +48,6 @@ module QA
context 'when moving from Gitaly to Gitaly Cluster', :requires_praefect, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/974' do context 'when moving from Gitaly to Gitaly Cluster', :requires_praefect, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/974' do
let(:source_storage) { { type: :gitaly, name: QA::Runtime::Env.non_cluster_repository_storage } } let(:source_storage) { { type: :gitaly, name: QA::Runtime::Env.non_cluster_repository_storage } }
let(:destination_storage) { { type: :praefect, name: QA::Runtime::Env.praefect_repository_storage } } let(:destination_storage) { { type: :praefect, name: QA::Runtime::Env.praefect_repository_storage } }
let(:project) do let(:project) do
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
project.name = 'repo-storage-move' project.name = 'repo-storage-move'
...@@ -56,6 +57,10 @@ module QA ...@@ -56,6 +57,10 @@ module QA
end end
end end
before do
praefect_manager.gitlab = 'gitlab-gitaly-cluster'
end
it_behaves_like 'repository storage move' it_behaves_like 'repository storage move'
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment