Commit 15cd7746 authored by Stan Hu's avatar Stan Hu

Fix Geo geo:set_primary_node task not working with HTTPS

The Rake task to set the current node as primary in Geo did not account for HTTPS.
parent 6873e735
......@@ -100,7 +100,8 @@ namespace :geo do
end
def set_primary_geo_node(public_key)
params = { host: Gitlab.config.gitlab.host,
params = { schema: Gitlab.config.gitlab.protocol,
host: Gitlab.config.gitlab.host,
port: Gitlab.config.gitlab.port,
relative_url_root: Gitlab.config.gitlab.relative_url_root,
primary: true,
......
......@@ -10,6 +10,7 @@ describe 'geo rake tasks' do
before do
expect(Gitlab::Geo).to receive(:license_allows?).and_return(true)
stub_config_setting(protocol: 'https')
end
it 'creates a GeoNode' do
......@@ -25,6 +26,7 @@ describe 'geo rake tasks' do
expect(GeoNode.count).to eq(1)
node = GeoNode.first
expect(node.schema).to eq('https')
expect(node.primary).to be_truthy
expect(node.geo_node_key.key).to eq(ssh_key)
ensure
......
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