Sha256: e798a403c8c835740add29fba2ef3b3b35f85566e49a06a7314c82753053710b
Contents?: true
Size: 1.57 KB
Versions: 26
Compression:
Stored size: 1.57 KB
Contents
require 'test/unit' require 'shoulda/context' require_relative '../lib/veracodecli/api' include VeracodeApiScan include VeracodeApiResults class TestVeracodecli < Test::Unit::TestCase context 'VeracodeApi' do setup do ENV['VERACODE_USERNAME'] = '' ENV['VERACODE_PASSWORD'] = '' @test_file_location = '' # a .tar or .zip archive path end should 'Return existing application profile ID' do assert_equal '12379', get_app_id('Test1') end should 'Return HTTP 200 for createapp.do' do assert_equal 200, veracode_api_request('createapp.do', app_name: 'Test1', business_criticality: 'Low', business_unit: 'TELUS Digital', teams: 'TELUS Digital').code end should 'Return HTTP 200 from beginprescan.do' do assert_equal 200, veracode_api_request('beginprescan.do', app_id:'12379').code end should 'Return Response Object' do assert_kind_of RestClient::Response, veracode_api_request('getapplist.do') end should 'Return XML response for uploadfile.do' do assert_boolean upload_file('12379', @test_file_location).include?('Uploaded') end should 'Return HTTP from get_prescan_results function' do assert_equal 200, get_prescan_results('12379').code end should 'Return XML response' do assert_boolean get_scan_report('12379').include?('<detailedreport') end should 'Return Application Scan Status' do assert_kind_of String, get_build_status('12379') end should 'Return Most recent Build ID' do assert_match /\d+/, get_most_recent_build_id('12379') end end end
Version data entries
26 entries across 26 versions & 1 rubygems