Commit 80863151 authored by Stan Hu's avatar Stan Hu

Fix Geo specs failing due to "lock out" validation errors

The FactoryGirl sequence for secondary GeoNode URLs started at port 80 and
incremented after each test. When the number reached the same value as the
current node (usually port 80), the GeoNode "lock out" validation would
fail. This change starts all secondaries at a port number higher than
the current node configuration to avoid this problem entirely.

Closes #4303
parent 8d717e94
FactoryGirl.define do
factory :geo_node do
sequence(:url) do |port|
# Start at a number higher than the current port to avoid the GeoNode
# "lock out" validation
sequence(:url, Gitlab.config.gitlab.port + 1) do |port|
uri = URI.parse("http://#{Gitlab.config.gitlab.host}:#{Gitlab.config.gitlab.relative_url_root}")
uri.port = port
uri.path += '/' unless uri.path.end_with?('/')
......
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