Sha256: 587bab47ae9c0cb4d750d53e68aceedd56b9680b5d6ffb7674afe3438bd6066a
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..') require 'tests/common' module RHEVMTest class ImagesTest < Test::Unit::TestCase include Rack::Test::Methods def app Sinatra::Application end def test_01_it_returns_images get_auth_url '/api;driver=rhevm/images' (last_xml_response/'images/image').length.should > 0 end def test_02_each_image_has_correct_properties get_auth_url '/api;driver=rhevm/images' (last_xml_response/'images/image').each do |image| (image/'name').should_not == nil (image/'name').should_not == '' (image/'description').should_not == nil (image/'description').should_not == '' (image/'architecture').should_not == nil (image/'architecture').should_not == '' (image/'state').text.should == 'OK' (image/'owner_id').text.should == ENV['API_USER'] (image/'actions/link').length.should == 1 (image/'actions/link').first[:rel].should == 'create_instance' end end def test_03_it_returns_single_image get_auth_url '/api;driver=rhevm/images/bb2e79bd-fd73-46a1-b391-a390b1998f03' (last_xml_response/'image').length.should == 1 (last_xml_response/'image/name').text.should == 'F14-Minimal-Srv' (last_xml_response/'image/state').text.should == 'OK' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-0.4.1 | tests/drivers/rhevm/images_test.rb |
deltacloud-core-0.4.0 | tests/drivers/rhevm/images_test.rb |
deltacloud-core-0.3.0 | tests/drivers/rhevm/images_test.rb |