# Copyright (c) 2014-2015 Perforce Software, Inc. All rights reserved. require 'rspec' require 'helix_web_services_client' require_relative './test_config' RSpec.describe 'HelixWebServicesClient projects' do my_project_id = 'My~20Project' context 'projects' do it 'should not fail when listing projects' do client_as_jdoe do |c| c.add_setting('HVE_PROJECTS_PATH', '//depot/main') c.projects end end context 'HVE Projects' do it 'should list project ids when details are not specified' do client_as_jdoe do |c| c.add_setting('HVE_PROJECTS_PATH', '//depot/main') projects = c.projects expect(projects).to include(my_project_id) end end it 'should list project details when details are specified' do client_as_jdoe do |c| c.add_setting('HVE_PROJECTS_PATH', '//depot/main') projects = c.projects(details: true) my_project = projects.find{|p| p.id == my_project_id} expect(my_project).to_not be_nil expect(my_project.name).to eq('My Project') expect(my_project.server).to_not be_nil expect(my_project.hve_project['depotPath']).to eq('//depot/main/My Project') if !cloud_test? expect(my_project.stream).to eq('//my_project/main') if cloud_test? end end end end context 'project' do it 'should trigger a 404 when fetching a project by invalid id' do client_as_jdoe do |c| expect { c.project('invalid') }.to raise_error(Errors::ResourceNotFound) end end context 'HVE Projects' do it 'should fetch my project details' do client_as_jdoe do |c| c.add_setting('HVE_PROJECTS_PATH', '//depot/main') my_project = c.project(my_project_id) expect(my_project).to_not be_nil expect(my_project.id).to eq(my_project_id) expect(my_project.name).to eq('My Project') expect(my_project.server).to_not be_nil expect(my_project.hve_project['depotPath']).to eq('//depot/main/My Project') if !cloud_test? expect(my_project.stream).to eq('//my_project/main') if cloud_test? end end end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 16040 | Doug Scheirer | I think the pending tests is at a minimum for cloud enabled, so readyto integrate up? | ||
#4 | 16026 | Doug Scheirer | Marked last few cloud tests pending, enabled test:cloud by default | ||
#3 | 16024 | Doug Scheirer | Some cloud spec forking, got the mock_raymond to spin up in cloud testing, split normal vs cloud spec output | ||
#2 | 15875 | Doug Scheirer | 'Fixes' for broken tests | ||
#1 | 15688 | Doug Scheirer |
Populate -o //guest/perforce_software/helix-web-services/... //guest/doug_scheirer/helix-web-services/.... |
||
//guest/perforce_software/helix-web-services/main/source/helix_web_services_client/spec/projects_spec.rb | |||||
#1 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
//guest/perforce_software/helix-web-services/main/helix_web_services_client/spec/projects_spec.rb | |||||
#3 | 15542 | tjuricek |
Add spaces to our basic 'component encode' mechanism, and use it for HVE project IDs. In general, this will make the HVE IDs a bit more readable. |
||
#2 | 15437 | tjuricek |
Basic "HVE Project" implementation. This will allow directories in a HVE instance to host 'projects' for use by helix sync. There are no methods defined for creating the projects, however. This does not include any specialization or testing in the Qt API yet. I may investigate creating a "higher level" interface for Qt client apps. |
||
#1 | 15099 | tjuricek | Revise project services to be our simple 'container' for other systems. |