$:.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
server_id = "test-server-#{random_string}"
server_command = HelixWebServices::ServerCommand.new(
serverID: server_id,
description: "test #{server_id}",
type: 'server',
services: 'standard'
)
api.server_servers_post('localhost', server_command)
all_servers = api.server_servers_get('localhost')
unless all_servers.any? { |b| b.server_id == server_id }
raise "Did not locate server #{server_id}"
end
saved_server = api.server_servers_server_id_get('localhost', server_id)
raise 'server was not saved' if saved_server.description.strip != server_command.description.strip
to_update = HelixWebServices::ServerCommand.new(
description: "Update #{rand}"
)
api.server_servers_server_id_patch('localhost', server_id, to_update)
updated = api.server_servers_server_id_get('localhost', server_id)
raise 'server not updated' if updated.description.strip != to_update.description.strip
api.server_servers_server_id_delete('localhost', server_id)
all_servers2 = api.server_servers_get('localhost')
if all_servers2.any? { |b| b.server == server_id }
raise "Did not delete server #{server_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_servers.crud.rb
#2
19235
tjuricek
The server spec crud test didn't run as super (hence a failure) and we needed to wait for buffered reading to finish before moving ahead with background processes.
#1
19199
tjuricek
Ruby Client SDK tests, labels through users.