Commit 49c5b94c authored by Dan Davison's avatar Dan Davison

Merge branch 'ml-update-gitaly-cluster-test' into 'master'

Enable writes after failover

See merge request gitlab-org/gitlab!35572
parents 1ed2711c 5b388951
......@@ -13,6 +13,10 @@ module QA
@secondary_node = @second_node
end
def enable_writes
shell "docker exec praefect bash -c '/opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.toml enable-writes -virtual-storage default'"
end
def stop_primary_node
shell "docker stop #{@primary_node}"
@secondary_node, @primary_node = @primary_node, @secondary_node
......
......@@ -10,7 +10,7 @@ module QA
end
end
let(:initial_file) { 'pushed_to_primary.txt' }
let(:final_file) { 'pushed_to_secondary.txt' }
let(:final_file) { 'committed_to_primary.txt' }
let(:praefect_manager) { Service::PraefectManager.new }
before do
......@@ -41,11 +41,13 @@ module QA
expect(show).to have_file(initial_file)
end
praefect_manager.enable_writes
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.add_files([
{
file_path: 'committed_to_primary.txt',
file_path: final_file,
content: 'This should exist on both nodes too'
}
])
......
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