Improved fqdn detection with :port urls.
This commit is contained in:
parent
7a5f73c79a
commit
f529def251
2 changed files with 32 additions and 2 deletions
|
@ -147,7 +147,7 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
|
||||||
# split url in http_type and fqdn
|
# split url in http_type and fqdn
|
||||||
settings = {}
|
settings = {}
|
||||||
if !Setting.get('system_online_service')
|
if !Setting.get('system_online_service')
|
||||||
if params[:url] =~ %r{/^(http|https)://(.+?)$}
|
if params[:url] =~ %r{/^(http|https)://(.+?)(:.+?|/.+?|)$}
|
||||||
Setting.set('http_type', $1)
|
Setting.set('http_type', $1)
|
||||||
settings[:http_type] = $1
|
settings[:http_type] = $1
|
||||||
Setting.set('fqdn', $2)
|
Setting.set('fqdn', $2)
|
||||||
|
|
|
@ -165,7 +165,37 @@ class AaaGettingStartedTest < TestCase
|
||||||
)
|
)
|
||||||
location_check(
|
location_check(
|
||||||
url: '#clues',
|
url: '#clues',
|
||||||
#url: '#dashboard',
|
#url: '#dashboard',
|
||||||
|
)
|
||||||
|
|
||||||
|
clues_close(
|
||||||
|
optional: false,
|
||||||
|
)
|
||||||
|
|
||||||
|
# verify organization and fqdn
|
||||||
|
click(
|
||||||
|
css: 'a[href="#manage"]',
|
||||||
|
)
|
||||||
|
click(
|
||||||
|
css: 'a[href="#settings/branding"]',
|
||||||
|
)
|
||||||
|
|
||||||
|
match(
|
||||||
|
css: '#content input[name="organization"]',
|
||||||
|
value: 'Some Organization',
|
||||||
|
)
|
||||||
|
click(
|
||||||
|
css: 'a[href="#settings/system"]',
|
||||||
|
)
|
||||||
|
|
||||||
|
fqdn = nil
|
||||||
|
if browser_url =~ %r{://(.+?)(:.+?|/.+?|)$}
|
||||||
|
fqdn = $1
|
||||||
|
end
|
||||||
|
raise "Unable to get fqdn based on #{browser_url}" if !fqdn
|
||||||
|
match(
|
||||||
|
css: '#content input[name="fqdn"]',
|
||||||
|
value: fqdn,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue