$:.push File.expand_path("../../lib", __FILE__) require 'helix_web_services_client' require_relative './util/test_config' require_relative './util/string_utils' require 'pp' api = api_as_super rand = random_string depot_id = "test-depot-#{random_string}" depot_command = HelixWebServices::DepotCommand.new( depot: depot_id, type: 'local', map: "#{depot_id}/...", description: "test #{rand}" ) api.server_depots_post('localhost', depot_command) all_depots = api.server_depots_get('localhost') unless all_depots.any? { |b| b.depot == depot_id } raise "Did not locate depot #{depot_id}" end saved_depot = api.server_depots_depot_get('localhost', depot_id) unless saved_depot.description.strip == depot_command.description.strip raise "Did not save description of #{depot_id}" end to_update = HelixWebServices::DepotCommand.new( description: "Update #{rand}" ) api.server_depots_depot_patch('localhost', depot_id, to_update) updated = api.server_depots_depot_get('localhost', depot_id) raise 'depot not updated' if updated.description.strip != to_update.description.strip api.server_depots_depot_delete('localhost', depot_id) all_depots2 = api.server_depots_get('localhost') if all_depots2.any? { |b| b.depot == depot_id } raise "Did not delete depot #{depot_id}" end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19553 | swellard | Move and rename clients | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/ruby/test/default_api.server_depots.crud.rb | |||||
#1 | 19198 | tjuricek |
Ruby Client SDK tests, from branches to jobs. Submitting since I've had to alter the Ruby swagger templates, and I want to make sure I haven't lost something. |