summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2018-04-10 21:07:39 +0100
committerConstance Okoghenun <cokoghenun@gitlab.com>2018-04-10 21:07:39 +0100
commit41ccfc30075e07534af7047dd0887708fb974f83 (patch)
treedd835c69ad4407451a960a31fafad76f676de8b8
parentc6cb3f24586dca3f23b54917c1a44818c3aefce3 (diff)
downloadgitlab-ce-gitlab-selenium-proxy-test-fingerprinting.tar.gz
Fixed broken selenium proxy urlgitlab-selenium-proxy-test-fingerprinting
-rw-r--r--spec/support/capybara.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index 2b952348082..253edbe0c3f 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -82,19 +82,36 @@ RSpec.configure do |config|
end
+ puts Gitlab::Utils.to_boolean(ENV['GITLAB_SELENIUM_SERVER'])
+ puts "====================================================="
+
if Gitlab::Utils.to_boolean(ENV['GITLAB_SELENIUM_SERVER'])
test_path = self.inspect.to_s.sub("(", "").sub(")>", "").split("\"")
+ puts test_path
+ puts "Hello World"
- uri = URI::join("#{ENV['SELENIUM_REMOTE_URL']}", "session/#{session.driver.browser.capabilities['webdriver.remote.sessionid']}/gitlab-meta")
+ uri = URI::join("#{ENV['SELENIUM_REMOTE_URL']}/", "session/#{session.driver.browser.capabilities['webdriver.remote.sessionid']}/gitlab-meta")
req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
req.body = {
description: test_path[1],
location: test_path[2],
}.to_json
+
+ puts uri;
+ puts "====================================================="
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
http.request(req)
end
+
+ case res
+ when Net::HTTPSuccess, Net::HTTPRedirection
+ puts res.inspect
+ puts " Net::HTTPSuccess, Net::HTTPRedirection ====================================================="
+ else
+ puts res.inspect
+ puts " else ====================================================="
+ end
end
end