Class: Torpedo::Compute::Flavors

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/torpedo/compute/flavors.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



7
8
9
# File 'lib/torpedo/compute/flavors.rb', line 7

def setup
  @conn=Helper::get_connection
end

#test_getObject



22
23
24
25
26
27
28
29
30
# File 'lib/torpedo/compute/flavors.rb', line 22

def test_get

  flavor = @conn.flavor(1)
  assert_not_nil(flavor.id)
  assert_not_nil(flavor.name)
  assert_not_nil(flavor.ram)
  assert_not_nil(flavor.disk)

end

#test_listObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/torpedo/compute/flavors.rb', line 11

def test_list

  @conn.flavors.each do |flavor|
    assert_not_nil(flavor[:id])
    assert_not_nil(flavor[:name])
    assert_not_nil(flavor[:ram])
    assert_not_nil(flavor[:disk])
  end

end