mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00

list ssh_keys and create disk add models and requests for create computer create server at once add bin and route file update create_with write getting_started wip. and create helper methods. add sakura to mock_helper add bin and route file write getting_started wip. and create helper methods. add mocks and test create tests and write getting started writenig provider for sakuracloud ,wip list ssh_keys and create disk add models and requests for create computer create server at once add bin and route file update create_with write getting_started wip. and create helper methods. add sakura to mock_helper add bin and route file write getting_started wip. and create helper methods. add mocks and test create tests and write getting started mv getting_started to docs mv getting_started to docs use snake_case for models fix: wrong usage of :aliases update doc. replace to snake_case from class update mocks format Fix: remove commas for Ruby 1.8.7 duplicate example use create method with option if atatch volume remove empty line (checking travis works..) fix args for core/provider.rb#service
47 lines
1.2 KiB
Ruby
47 lines
1.2 KiB
Ruby
# coding: utf-8
|
|
Shindo.tests('Fog::Volume[:sakuracloud] | list_disks request', ['sakuracloud', 'volume']) do
|
|
|
|
@disks_format = {
|
|
'Index' => Integer,
|
|
'ID' => Integer,
|
|
'Name' => String,
|
|
'Connection' => String,
|
|
'Availability' => String,
|
|
'SizeMB' => Integer,
|
|
'Plan' => Hash
|
|
}
|
|
|
|
tests('success') do
|
|
|
|
tests('#list_disks') do
|
|
disks = volume_service.list_disks
|
|
test 'returns a Hash' do
|
|
disks.body.is_a? Hash
|
|
end
|
|
if Fog.mock?
|
|
tests('Disks').formats(@disks_format, false) do
|
|
disks.body['Disks'].first
|
|
end
|
|
else
|
|
returns(200) { disks.status }
|
|
returns(true) { disks.body.is_a? Hash }
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
Shindo.tests('Fog::Volume[:sakuracloud] | create_disks request', ['sakuracloud', 'volume']) do
|
|
tests('success') do
|
|
tests('#create_disks') do
|
|
disks = volume_service.create_disk('foobar', 4, 112500463685)
|
|
test 'returns a Hash' do
|
|
disks.body.is_a? Hash
|
|
end
|
|
|
|
unless Fog.mock?
|
|
returns(202) { disks.status }
|
|
returns(true) { disks.body.is_a? Hash }
|
|
end
|
|
end
|
|
end
|
|
end
|