Skip to content

Commit

Permalink
SDCA-180 - Support Virus Scanning in Ruby Client
Browse files Browse the repository at this point in the history
  • Loading branch information
szprutamich committed Jul 13, 2020
1 parent 856c6ad commit 99b45a2
Show file tree
Hide file tree
Showing 33 changed files with 93 additions and 35 deletions.
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
testdroid-api-client (0.4.1)
testdroid-api-client (0.5.0)
deep_merge (~> 1.2)
faraday (~> 0.17, >= 0.17)
oauth2 (~> 1.4)
Expand All @@ -28,12 +28,12 @@ GEM
jwt (2.2.1)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
multi_json (1.14.1)
mime-types-data (3.2020.0512)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
netrc (0.11.0)
oauth2 (1.4.2)
oauth2 (1.4.4)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
Expand Down Expand Up @@ -65,7 +65,7 @@ GEM
safe_yaml (1.0.5)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unf_ext (0.0.7.7)
vcr (5.0.0)
webmock (3.7.6)
addressable (>= 2.3.6)
Expand Down
4 changes: 3 additions & 1 deletion lib/testdroid-api-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
require 'rest-client'
require 'deep_merge'
require 'oauth2'

require 'timeout'
require 'set'

require 'testdroid_api/client'
require 'testdroid_api/apikey_client'

Expand Down
46 changes: 44 additions & 2 deletions lib/testdroid_api/files.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,58 @@
module TestdroidAPI
class Files < CloudListResource

def upload(filename)
ACCEPTED_VIRUS_SCAN_STATUSES = Set['safe', 'disabled', nil]

def upload(filename, skip_scan_wait=false)
unless ::File.exist?(filename)
@client.logger.error("Invalid filename")
return
end
file = @client.upload("#{@uri}", filename)
File.new("#{@uri}/#{file['id']}", @client, file)
result = File.new("#{@uri}/#{file['id']}", @client, file)
if !skip_scan_wait
wait_for_virus_scan(Array(result))
end
return result
end

def wait_for_virus_scan(api_files, timeout=300)
all_safe = false
begin
Timeout.timeout(timeout) do
while !all_safe do
statuses = Set.new
api_files.each do |file|
current_status = get_virus_scan_status(file)
if ACCEPTED_VIRUS_SCAN_STATUSES.include?(current_status)
statuses.add(current_status)
else
sleep(1)
file.refresh
statuses.add(get_virus_scan_status(file))
end
end
if statuses.include?('infected')
raise 'File rejected by virus scan'
end
if ACCEPTED_VIRUS_SCAN_STATUSES.superset?(statuses)
all_safe = true
end
end
end
rescue Timeout::Error
@client.logger.error("Waiting for virus scan timed out")
raise
end
end

private

def get_virus_scan_status(file)
return file.file_properties.find{ |item| item['key'] == "virus_scan_status" }['value']
end
end

class File < CloudResource
def initialize(uri, client, params = {})
super uri, client, "file", params
Expand Down
11 changes: 11 additions & 0 deletions spec/files_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
end
end

it 'upload with wait' do
VCR.use_cassette(File.basename(__FILE__).split('_spec')[0] + '_upload_with_wait') do
uploaded = []
['data.txt', 'data2.txt'].each do |file_name|
file = @user.files.upload(File.join(File.dirname(__FILE__), 'fixtures', file_name), true)
uploaded.push(file)
end
@user.files.wait_for_virus_scan(uploaded, 120)
end
end

it 'get file' do
VCR.use_cassette(File.basename(__FILE__).split('_spec')[0] + '_get_one') do
file = @user.files.get(F_ID)
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/cassettes/device_groups_authorize.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"post","uri":"http://localhost/testdroid-cloud/oauth/token","body":{"encoding":"UTF-8","base64_string":"Y2xpZW50X2lkPXRlc3Rkcm9pZC1jbG91ZC1hcGkmY2xpZW50X3NlY3JldCZn\ncmFudF90eXBlPXBhc3N3b3JkJnBhc3N3b3JkPWFkbWluJnVzZXJuYW1lPWFk\nbWluJTQwbG9jYWxob3N0\n"},"headers":{"User-Agent":["Faraday v0.17.0"],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":200,"message":""},"headers":{"server":["nginx/1.14.0 (Ubuntu)"],"date":["Wed, 13 Nov 2019 14:18:21 GMT"],"content-type":["application/json;charset=UTF-8"],"transfer-encoding":["chunked"],"connection":["keep-alive"],"pragma":["no-cache"],"cache-control":["no-store"],"x-content-type-options":["nosniff"],"x-xss-protection":["1; mode=block"],"x-frame-options":["DENY"],"access-control-allow-methods":["GET, POST, OPTIONS, DELETE"],"access-control-allow-credentials":["true"]},"body":{"encoding":"UTF-8","base64_string":"eyJhY2Nlc3NfdG9rZW4iOiJjNWQxZjEwNC05MWZhLTRjNGItODc0Ni03OWVm\nYTdkYzhkMDMiLCJ0b2tlbl90eXBlIjoiYmVhcmVyIiwicmVmcmVzaF90b2tl\nbiI6ImI5ZTZhOTMwLTI0NzAtNGRmZS04NzAyLWY4YTMzODY0N2U0MiIsImV4\ncGlyZXNfaW4iOjk3Niwic2NvcGUiOiJyZWFkIHdyaXRlIn0=\n"},"http_version":null},"recorded_at":"Wed, 13 Nov 2019 14:18:21 GMT"},{"request":{"method":"get","uri":"http://localhost/testdroid-cloud/api/v2/me","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"User-Agent":["Faraday v0.17.0"],"Authorization":["Bearer c5d1f104-91fa-4c4b-8746-79efa7dc8d03"]}},"response":{"status":{"code":200,"message":""},"headers":{"server":["nginx/1.14.0 (Ubuntu)"],"date":["Wed, 13 Nov 2019 14:18:21 GMT"],"content-type":["application/json;charset=UTF-8"],"transfer-encoding":["chunked"],"connection":["keep-alive"],"set-cookie":["XSRF-TOKEN=e580dae6-59a4-4abd-8a2a-b5f7fb54e558; Path=/"],"x-content-type-options":["nosniff"],"x-xss-protection":["1; mode=block"],"cache-control":["no-cache, no-store, max-age=0, must-revalidate"],"pragma":["no-cache"],"expires":["0"],"x-frame-options":["DENY"],"access-control-allow-methods":["GET, POST, OPTIONS,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U5HIiwidmFsdWUiOjEs\nInZhbHVlQ2FsY3VsYXRlZCI6ZmFsc2V9LHsiaWQiOjg5ODUsInNlbGZVUkki\nOm51bGwsImFkZGVkQnlFbWFpbCI6bnVsbCwiZXhwaXJlVGltZSI6bnVsbCwi\nbmFtZSI6IlBSSU9SSVRZX01PQklMRSIsInZhbHVlIjo0MCwidmFsdWVDYWxj\ndWxhdGVkIjpmYWxzZX1dLCJzdGF0ZSI6IiIsInN0YXR1cyI6IkVOQUJMRUQi\nLCJ0aW1lWm9uZSI6IkdNVCIsInZhdElkIjpudWxsLCJhcGlLZXkiOiI2NmQ2\nNDk1ODdiNGQ5ZDI3MTM2N2ZkOTNmZTkwZmIwOSIsImNyZWF0ZWRCeUlkIjpu\ndWxsLCJjcmVhdGVkQnlFbWFpbCI6bnVsbCwibWZhUVJDb2RlVXJsIjpudWxs\nLCJtZmFTdGF0dXMiOiJESVNBQkxFRCJ9\n"},"http_version":null},"recorded_at":"Wed, 13 Nov 2019 14:18:21 GMT"},{"request":{"method":"get","uri":"http://localhost/testdroid-cloud/api/v2/users/1","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"User-Agent":["Faraday v0.17.0"],"Authorization":["Bearer c5d1f104-91fa-4c4b-8746-79efa7dc8d03"]}},"response":{"status":{"code":200,"message":""},"headers":{"server":["nginx/1.14.0 (Ubuntu)"],"date":["Wed, 13 Nov 2019 14:18:21 GMT"],"content-type":["application/json;charset=UTF-8"],"transfer-encoding":["chunked"],"connection":["keep-alive"],"set-cookie":["XSRF-TOKEN=3bb865bb-0161-45ea-9319-c8c39e23b5ed; Path=/"],"x-content-type-options":["nosniff"],"x-xss-protection":["1; mode=block"],"cache-control":["no-cache, no-store, max-age=0, must-revalidate"],"pragma":["no-cache"],"expires":["0"],"x-frame-options":["DENY"],"access-control-allow-methods":["GET, POST, OPTIONS, DELETE"],"access-control-allow-credentials":["true"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJpZCI6MSwic2VsZlVSSSI6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GZVUkki\nOm51bGwsImFkZGVkQnlFbWFpbCI6bnVsbCwiZXhwaXJlVGltZSI6bnVsbCwi\nbmFtZSI6IlBSSU9SSVRZX01PQklMRSIsInZhbHVlIjo0MCwidmFsdWVDYWxj\ndWxhdGVkIjpmYWxzZX1dLCJzdGF0ZSI6IiIsInN0YXR1cyI6IkVOQUJMRUQi\nLCJ0aW1lWm9uZSI6IkdNVCIsInZhdElkIjpudWxsLCJhcGlLZXkiOiI2NmQ2\nNDk1ODdiNGQ5ZDI3MTM2N2ZkOTNmZTkwZmIwOSIsImNyZWF0ZWRCeUlkIjpu\ndWxsLCJjcmVhdGVkQnlFbWFpbCI6bnVsbCwibWZhUVJDb2RlVXJsIjpudWxs\nLCJtZmFTdGF0dXMiOiJESVNBQkxFRCJ9\n"},"http_version":null},"recorded_at":"Wed, 13 Nov 2019 14:18:21 GMT"}],"recorded_with":"VCR 5.0.0"}
{"http_interactions":[{"request":{"method":"post","uri":"http://localhost/testdroid-cloud/oauth/token","body":{"encoding":"UTF-8","base64_string":"Y2xpZW50X2lkPXRlc3Rkcm9pZC1jbG91ZC1hcGkmY2xpZW50X3NlY3JldCZn\ncmFudF90eXBlPXBhc3N3b3JkJnBhc3N3b3JkPXRlc3QxMjMmdXNlcm5hbWU9\nbWljaGFsLnN6cHJ1dGElNDBiaXRiYXIuY29t\n"},"headers":{"User-Agent":["Faraday v0.17.0"],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":200,"message":""},"headers":{"server":["nginx/1.14.0 (Ubuntu)"],"date":["Mon, 13 Jul 2020 13:30:22 GMT"],"content-type":["application/json;charset=UTF-8"],"transfer-encoding":["chunked"],"connection":["keep-alive"],"pragma":["no-cache"],"cache-control":["no-store"],"x-content-type-options":["nosniff"],"x-xss-protection":["1; mode=block"],"x-frame-options":["DENY"],"access-control-allow-methods":["GET, POST, OPTIONS, DELETE"],"access-control-allow-credentials":["true"]},"body":{"encoding":"UTF-8","base64_string":"eyJhY2Nlc3NfdG9rZW4iOiI1YzRkNTU5OS1jOTVjLTQwNTktOWI5Zi00NTFj\nMDhhYjQxZTMiLCJ0b2tlbl90eXBlIjoiYmVhcmVyIiwicmVmcmVzaF90b2tl\nbiI6IjIwMDRkNTQ2LWUzNDQtNDZlZS05Yjg1LThkYzY0ZTBhY2U3NyIsImV4\ncGlyZXNfaW4iOjE0MDksInNjb3BlIjoicmVhZCB3cml0ZSJ9\n"},"http_version":null},"recorded_at":"Mon, 13 Jul 2020 13:30:22 GMT"},{"request":{"method":"get","uri":"http://localhost/testdroid-cloud/api/v2/me","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"User-Agent":["Faraday v0.17.0"],"Authorization":["Bearer 5c4d5599-c95c-4059-9b9f-451c08ab41e3"]}},"response":{"status":{"code":200,"message":""},"headers":{"server":["nginx/1.14.0 (Ubuntu)"],"date":["Mon, 13 Jul 2020 13:30:22 GMT"],"content-type":["application/json;charset=UTF-8"],"transfer-encoding":["chunked"],"connection":["keep-alive"],"set-cookie":["XSRF-TOKEN=b4f0581a-cd41-49ec-b799-551c27b6b3a5; Path=/"],"x-content-type-options":["nosniff"],"x-xss-protection":["1; mode=block"],"cache-control":["no-cache, no-store, max-age=0, must-revalidate"],"pragma":["no-cache"],"expires":["0"],"x-frame-options":["DENY"],"access-control-allow-methods":["GET, POST, OPTIONS, DELETE"],"access-control-allow-credentials":["true"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6Miwic2VsZlVSSSI6Ii91c2Vycy8yIiwic2VydmljZUlkcyI6W10s\nImFjY291bnRJZCI6MiwiYWNjb3VudFNlcnZpY2VJZHMiOltdLCJhZGRyZXNz\nIjoic2Rmc2RmIiwiY2l0eSI6InNkZnNkZiIsImNvZGUiOiJzZGZkc2YiLCJj\nb3VudHJ5IjoiUEciLCJjcmVhdGVUaW1lIjoxNDQ3OTQwMDI4MDAwLCJkZWxl\ndGVUaW1lIjpudWxsLCJlbWFpbCI6Im1pY2hhbC5zenBydXRhQGJpdGJhci5j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RCeUVtYWlsIjpudWxsLCJleHBpcmVUaW1lIjpudWxsLCJuYW1l\nIjoiUFJJT1JJVFlfTU9CSUxFIiwidmFsdWUiOjYwLCJ2YWx1ZUNhbGN1bGF0\nZWQiOmZhbHNlfV0sInN0YXRlIjoiIiwic3RhdHVzIjoiRU5BQkxFRCIsInRp\nbWVab25lIjoiUFNUIiwidmF0SWQiOm51bGwsImFwaUtleSI6InJOaG9weXEz\nUTZST1BBczNOOFo3dmV1UE1IbGFmdVdiIiwiY3JlYXRlZEJ5SWQiOm51bGws\nImNyZWF0ZWRCeUVtYWlsIjpudWxsLCJtZmFRUkNvZGVVcmwiOm51bGwsIm1m\nYVN0YXR1cyI6IkRJU0FCTEVEIiwicmVnaXN0cmF0aW9uSVAiOiIxODUuNzUu\nMi4yLCAxMC4yLjMuMzciLCJvcmlnaW5Qb3J0YWwiOmZhbHNlfQ==\n"},"http_version":null},"recorded_at":"Mon, 13 Jul 2020 13:30:22 GMT"},{"request":{"method":"get","uri":"http://localhost/testdroid-cloud/api/v2/users/2","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"User-Agent":["Faraday v0.17.0"],"Authorization":["Bearer 5c4d5599-c95c-4059-9b9f-451c08ab41e3"]}},"response":{"status":{"code":200,"message":""},"headers":{"server":["nginx/1.14.0 (Ubuntu)"],"date":["Mon, 13 Jul 2020 13:30:22 GMT"],"content-type":["application/json;charset=UTF-8"],"transfer-encoding":["chunked"],"connection":["keep-alive"],"set-cookie":["XSRF-TOKEN=9fe3da74-e95f-498b-900b-af4193d423ae; Path=/"],"x-content-type-options":["nosniff"],"x-xss-protection":["1; mode=block"],"cache-control":["no-cache, no-store, max-age=0, must-revalidate"],"pragma":["no-cache"],"expires":["0"],"x-frame-options":["DENY"],"access-control-allow-methods":["GET, POST, OPTIONS, DELETE"],"access-control-allow-credentials":["true"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6Miwic2VsZlVSSSI6Ii91c2Vycy8yIiwic2VydmljZUlkcyI6W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hbGN1bGF0ZWQiOmZhbHNlfSx7ImlkIjozNTk3LCJzZWxmVVJJ\nIjpudWxsLCJhZGRlZEJ5RW1haWwiOm51bGwsImV4cGlyZVRpbWUiOm51bGws\nIm5hbWUiOiJURVNUX1JVTl9TQ1JFRU5TSE9UUyIsInZhbHVlIjo1MCwidmFs\ndWVDYWxjdWxhdGVkIjpmYWxzZX0seyJpZCI6NDE4OSwic2VsZlVSSSI6bnVs\nbCwiYWRkZWRCeUVtYWlsIjpudWxsLCJleHBpcmVUaW1lIjpudWxsLCJuYW1l\nIjoiUFJJT1JJVFlfTU9CSUxFIiwidmFsdWUiOjYwLCJ2YWx1ZUNhbGN1bGF0\nZWQiOmZhbHNlfV0sInN0YXRlIjoiIiwic3RhdHVzIjoiRU5BQkxFRCIsInRp\nbWVab25lIjoiUFNUIiwidmF0SWQiOm51bGwsImFwaUtleSI6InJOaG9weXEz\nUTZST1BBczNOOFo3dmV1UE1IbGFmdVdiIiwiY3JlYXRlZEJ5SWQiOm51bGws\nImNyZWF0ZWRCeUVtYWlsIjpudWxsLCJtZmFRUkNvZGVVcmwiOm51bGwsIm1m\nYVN0YXR1cyI6IkRJU0FCTEVEIiwicmVnaXN0cmF0aW9uSVAiOiIxODUuNzUu\nMi4yLCAxMC4yLjMuMzciLCJvcmlnaW5Qb3J0YWwiOmZhbHNlfQ==\n"},"http_version":null},"recorded_at":"Mon, 13 Jul 2020 13:30:22 GMT"}],"recorded_with":"VCR 5.0.0"}
Loading

0 comments on commit 99b45a2

Please sign in to comment.