# Copyright (c) 2014 Perforce Software, Inc. All rights reserved. require 'rspec' require 'p4_web_api_client' require_relative 'test_connections' RSpec.describe P4WebApiClient::Client, '#create_depot' do it 'should create a new depot - and return it via #depots' do client_as_jdoe do |c| new_depot = P4WebApiClient::Models::Depot.new new_depot.depot = 'new_depot' new_depot.description = 'A depot' new_depot.type = :local new_depot.map = 'new_depot/...' c.create_depot(new_depot) depots = c.depots expect(depots.map(&:depot)).to include('new_depot') end end end RSpec.describe P4WebApiClient::Client, '#depot' do it 'should load a single depot created via #create_depot' do client_as_jdoe do |c| new_depot = c.depot('new_depot') expect(new_depot.description.strip).to eq('A depot') end end end RSpec.describe P4WebApiClient::Client, '#update_depot' do it "'should be able to update the depot description'" do client_as_jdoe do |c| new_depot = c.depot('new_depot') new_depot.description = 'updated' c.update_depot(new_depot) loaded = c.depot('new_depot') expect(loaded.description.strip).to eq('updated') end end end RSpec.describe P4WebApiClient::Client, '#delete_depot' do it "'should be able to delete a depot created via #create_depot'" do client_as_jdoe do |c| c.delete_depot('new_depot') depots = c.depots expect(depots.map(&:depot)).to_not include('new_depot') end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 13972 | tjuricek |
Removing old microservice implementations. The system is now mostly a monolith. Eventually there will be a websocket service. |
||
#4 | 13514 | tjuricek |
Revised some of the p4_web_api tests to work under the installed 'production' perforce system. Notes on data resets: sudo p4dctl stop helix-evaluation sudo rm -rf /var/lib/perforce/p4d sudo /opt/perforce/sbin/configure-perforce-server.sh helix-evaluation -n -p 1666 -r /var/lib/perforce/p4d -u super -P 'superuser1A!' --unicode sudo su webservices /home/webservices/.rvm/wrappers/ruby-2.2.2@p4webapi/p4util init -p :1666 /home/vagrant/p4ws/p4init |
||
#3 | 13513 | tjuricek | Update several files that were missing from the last commit regarding a basic 'test' environment | ||
#2 | 13474 | tjuricek | Corrected regressions that broke the API and Project services specs. | ||
#1 | 13412 | tjuricek |
Initial version of the web-services mainline. This is a collection of several projects, that will likely often get released together, though many of them may not always be relevant. See the README for more information. |