-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
volume_type_tests.rb
42 lines (34 loc) · 1.08 KB
/
volume_type_tests.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'test_helper'
describe "Fog::Volume[:openstack] | volume_type requests" do
before do
@volume = Fog::Volume[:openstack]
@volume_type_format = {
'name' => String,
'extra_specs' => Hash,
'id' => String
}
@volume_type = @volume.create_volume_type(:name => 'test_volume_type').body['volume_type']
end
describe "success" do
it "#create_volume_type" do
@volume_type.must_match_schema(@volume_type_format)
end
it "#update_volume_type" do
@volume.update_volume_type(
@volume_type['id'],
:name => 'test_volume_type_1'
).body['volume_type'].must_match_schema(@volume_type_format)
end
it "#get_volume_type" do
@volume.get_volume_type_details(@volume_type['id']).body['volume_type'].
must_match_schema(@volume_type_format)
end
it "#list_volume_type" do
@volume.list_volume_types.body['volume_types'].
must_match_schema([@volume_type_format])
end
it 'delete the volute type' do
@volume.delete_volume_type(@volume_type['id'])
end
end
end