Skip to content

Commit

Permalink
[java] Deleting code related to running tests in SauceLabs cloud, we …
Browse files Browse the repository at this point in the history
…use Travis now.
  • Loading branch information
barancev committed Oct 3, 2019
1 parent 5a4ac1d commit 01afd4a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 296 deletions.
59 changes: 0 additions & 59 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -450,65 +450,6 @@ task :authors do
sh "(git log --use-mailmap --format='%aN <%aE>' ; cat .OLD_AUTHORS) | sort -uf > AUTHORS"
end

namespace :ci do
task :upload_to_sauce do
upload_path = ENV['UPLOAD_PATH']
username = ENV['SAUCE_USERNAME']
apikey = ENV['SAUCE_APIKEY']
upload_filename = Pathname.new(upload_path).basename
upload_url = "http://saucelabs.com/rest/v1/storage/#{username}/#{upload_filename}"
body = nil

File.open(find_file(upload_path), 'r') do |infile|
body = infile.read
end

6.times do
uri = URI.parse(upload_url)
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth(username, apikey)
request['Content-Type'] = 'application/octet-stream'
request.body = body
http = net_http.new(uri.host, uri.port)
http.read_timeout = 60 * 5 # 5 min
begin
response = http.request(request)
rescue StandardError => e
puts "issue uploading file: #{e}"
next
end
metadata = JSON.parse(response.body)
local_digest = Digest::MD5.hexdigest(body)
if metadata['md5'] == local_digest
puts "file successfully uploaded: #{metadata['filename']}"
else
puts "issues uploading file: #{response.code} - #{response.body}"
end
break
end
raise 'failed to upload to saucelabs after numerous retries'
end
end

# Required for above ci:upload_to_sauce rake only
require 'uri'
require 'net/http'
require 'digest/md5'
require 'json'
require 'pathname'

def net_http
http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
if http_proxy
http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
proxy_uri = URI.parse(http_proxy)

Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port)
else
Net::HTTP
end
end

at_exit do
if File.exist?(".git") && !SeleniumRake::Checks.windows?
system "sh", ".git-fixfiles"
Expand Down

This file was deleted.

170 changes: 0 additions & 170 deletions java/client/test/org/openqa/selenium/testing/drivers/SauceDriver.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public WebDriver get(Capabilities desiredCapabilities) {
WebDriver driver =
Stream.of(
new ExternalDriverSupplier(desiredCaps),
new SauceBackedDriverSupplier(desiredCaps),
new GridSupplier(desiredCaps),
new RemoteSupplier(desiredCaps),
new TestInternetExplorerSupplier(desiredCaps),
Expand Down

0 comments on commit 01afd4a

Please sign in to comment.