Commit d368100f authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-geo-rake-task-not-using-protocol' into 'master'

Fix Geo geo:set_primary_node task not working with HTTPS

See merge request !1774
parents b9208980 15cd7746
...@@ -100,7 +100,8 @@ namespace :geo do ...@@ -100,7 +100,8 @@ namespace :geo do
end end
def set_primary_geo_node(public_key) 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, port: Gitlab.config.gitlab.port,
relative_url_root: Gitlab.config.gitlab.relative_url_root, relative_url_root: Gitlab.config.gitlab.relative_url_root,
primary: true, primary: true,
......
...@@ -10,6 +10,7 @@ describe 'geo rake tasks' do ...@@ -10,6 +10,7 @@ describe 'geo rake tasks' do
before do before do
expect(Gitlab::Geo).to receive(:license_allows?).and_return(true) expect(Gitlab::Geo).to receive(:license_allows?).and_return(true)
stub_config_setting(protocol: 'https')
end end
it 'creates a GeoNode' do it 'creates a GeoNode' do
...@@ -25,6 +26,7 @@ describe 'geo rake tasks' do ...@@ -25,6 +26,7 @@ describe 'geo rake tasks' do
expect(GeoNode.count).to eq(1) expect(GeoNode.count).to eq(1)
node = GeoNode.first node = GeoNode.first
expect(node.schema).to eq('https')
expect(node.primary).to be_truthy expect(node.primary).to be_truthy
expect(node.geo_node_key.key).to eq(ssh_key) expect(node.geo_node_key.key).to eq(ssh_key)
ensure 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